Corrected occurrences of dataFactory in texts to data.

This commit is contained in:
asofold 2012-08-13 03:41:37 +02:00
parent 28e346f1ef
commit bac6ce8501
16 changed files with 49 additions and 49 deletions

View File

@ -52,7 +52,7 @@ public abstract class ActionWithParameters extends Action {
} }
/** /**
* Get a string with all the wildcards replaced with dataFactory from LogData. * Get a string with all the wildcards replaced with data from LogData.
* *
* @param check * @param check
* the check * the check

View File

@ -47,7 +47,7 @@ public class CommandAction extends ActionWithParameters {
* that can be directly used as a command in the console. * that can be directly used as a command in the console.
* *
* @param check * @param check
* The check that is used to fill in missing dataFactory. * The check that is used to fill in missing .
* @param violationData * @param violationData
* the violation data * the violation data
* @return The complete, ready to use, command. * @return The complete, ready to use, command.
@ -57,7 +57,7 @@ public class CommandAction extends ActionWithParameters {
} }
/** /**
* Convert the commands dataFactory into a string that can be used in the configuration files. * Convert the commands into a string that can be used in the configuration files.
* *
* @return the string * @return the string
*/ */

View File

@ -54,7 +54,7 @@ public class LogAction extends ActionWithParameters {
} }
/** /**
* Parse the final log message out of various dataFactory from the player and check that triggered the action. * Parse the final log message out of various data from the player and check that triggered the action.
* *
* @param player * @param player
* The player that is used as a source for the log message. * The player that is used as a source for the log message.

View File

@ -14,7 +14,7 @@ import fr.neatmonster.nocheatplus.actions.types.ActionList;
* MMMMMMMMMMM MMMMMMMMMMM * MMMMMMMMMMM MMMMMMMMMMM
*/ */
/** /**
* Violation specific dataFactory, for executing actions.<br> * Violation specific data, for executing actions.<br>
* This is meant to capture a violation incident in a potentially thread safe way. * This is meant to capture a violation incident in a potentially thread safe way.
* *
* @author asofold * @author asofold

View File

@ -26,7 +26,7 @@ import fr.neatmonster.nocheatplus.checks.CheckDataFactory;
* MMMMMMMMMMM * MMMMMMMMMMM
*/ */
/** /**
* Player specific dataFactory for the block interact checks. * Player specific data for the block interact checks.
*/ */
public class BlockInteractData implements CheckData { public class BlockInteractData implements CheckData {
@ -38,15 +38,15 @@ public class BlockInteractData implements CheckData {
} }
}; };
/** The map containing the dataFactory per players. */ /** The map containing the data per players. */
private static Map<String, BlockInteractData> playersMap = new HashMap<String, BlockInteractData>(); private static Map<String, BlockInteractData> playersMap = new HashMap<String, BlockInteractData>();
/** /**
* Gets the dataFactory of a specified player. * Gets the data of a specified player.
* *
* @param player * @param player
* the player * the player
* @return the dataFactory * @return the data
*/ */
public static BlockInteractData getData(final Player player) { public static BlockInteractData getData(final Player player) {
if (!playersMap.containsKey(player.getName())) if (!playersMap.containsKey(player.getName()))

View File

@ -38,15 +38,15 @@ public class BlockPlaceData implements CheckData {
} }
}; };
/** The map containing the dataFactory per players. */ /** The map containing the data per players. */
private static Map<String, BlockPlaceData> playersMap = new HashMap<String, BlockPlaceData>(); private static Map<String, BlockPlaceData> playersMap = new HashMap<String, BlockPlaceData>();
/** /**
* Gets the dataFactory of a specified player. * Gets the data of a specified player.
* *
* @param player * @param player
* the player * the player
* @return the dataFactory * @return the data
*/ */
public static BlockPlaceData getData(final Player player) { public static BlockPlaceData getData(final Player player) {
if (!playersMap.containsKey(player.getName())) if (!playersMap.containsKey(player.getName()))

View File

@ -19,7 +19,7 @@ import fr.neatmonster.nocheatplus.checks.CheckDataFactory;
* MMMMMMMMMMM MMMMMMMMMMM * MMMMMMMMMMM MMMMMMMMMMM
*/ */
/** /**
* Player specific dataFactory for the chat checks. * Player specific data for the chat checks.
*/ */
public class ChatData implements CheckData { public class ChatData implements CheckData {
@ -31,15 +31,15 @@ public class ChatData implements CheckData {
} }
}; };
/** The map containing the dataFactory per players. */ /** The map containing the data per players. */
private static Map<String, ChatData> playersMap = new HashMap<String, ChatData>(); private static Map<String, ChatData> playersMap = new HashMap<String, ChatData>();
/** /**
* Gets the dataFactory of a specified player. * Gets the data of a specified player.
* *
* @param player * @param player
* the player * the player
* @return the dataFactory * @return the data
*/ */
public synchronized static ChatData getData(final Player player) { public synchronized static ChatData getData(final Player player) {
if (!playersMap.containsKey(player.getName())) if (!playersMap.containsKey(player.getName()))
@ -67,7 +67,7 @@ public class ChatData implements CheckData {
public long noPwnageReloginWarningTime; public long noPwnageReloginWarningTime;
/** /**
* Clear the dataFactory of the no pwnage check. * Clear the data of the no pwnage check.
*/ */
public synchronized void clearNoPwnageData() { public synchronized void clearNoPwnageData() {
// TODO: re-think this sync [keep related to ChatData/NoPwnage/Color used lock.] // TODO: re-think this sync [keep related to ChatData/NoPwnage/Color used lock.]

View File

@ -179,7 +179,7 @@ public class NoPwnage extends Check {
if (cc.noPwnageCaptchaCheck && data.noPwnageHasStartedCaptcha) { if (cc.noPwnageCaptchaCheck && data.noPwnageHasStartedCaptcha) {
// Correct answer to the captcha? // Correct answer to the captcha?
if (message.equals(data.noPwnageGeneratedCaptcha)) { if (message.equals(data.noPwnageGeneratedCaptcha)) {
// Yes, clear his dataFactory and do not worry anymore about him. // Yes, clear his data and do not worry anymore about him.
data.clearNoPwnageData(); data.clearNoPwnageData();
data.noPwnageHasFilledCaptcha = true; data.noPwnageHasFilledCaptcha = true;
player.sendMessage(replaceColors(cc.noPwnageCaptchaSuccess)); player.sendMessage(replaceColors(cc.noPwnageCaptchaSuccess));
@ -288,7 +288,7 @@ public class NoPwnage extends Check {
cancel = executeActionsThreadSafe(player, data.noPwnageVL, cc.noPwnageActions, isMainThread); cancel = executeActionsThreadSafe(player, data.noPwnageVL, cc.noPwnageActions, isMainThread);
} }
// Store the message and some other dataFactory. // Store the message and some other data.
data.noPwnageLastMessage = message; data.noPwnageLastMessage = message;
data.noPwnageLastMessageTime = now; data.noPwnageLastMessageTime = now;
lastGlobalMessage = message; lastGlobalMessage = message;
@ -330,7 +330,7 @@ public class NoPwnage extends Check {
cancel = executeActionsThreadSafe(player, data.noPwnageVL, cc.noPwnageActions, true); cancel = executeActionsThreadSafe(player, data.noPwnageVL, cc.noPwnageActions, true);
} }
// Store his location and some other dataFactory. // Store his location and some other data.
data.noPwnageLastLocation = player.getLocation(); data.noPwnageLastLocation = player.getLocation();
data.noPwnageJoinTime = now; data.noPwnageJoinTime = now;

View File

@ -54,7 +54,7 @@ public class Angle extends Check {
// Add the new location to the map. // Add the new location to the map.
data.angleHits.put(System.currentTimeMillis(), player.getLocation()); data.angleHits.put(System.currentTimeMillis(), player.getLocation());
// Not enough dataFactory to calculate deltas. // Not enough data to calculate deltas.
if (data.angleHits.size() < 2) if (data.angleHits.size() < 2)
return false; return false;

View File

@ -21,7 +21,7 @@ import fr.neatmonster.nocheatplus.checks.CheckDataFactory;
* d8888P * d8888P
*/ */
/** /**
* Player specific dataFactory for the fight checks. * Player specific data for the fight checks.
*/ */
public class FightData implements CheckData { public class FightData implements CheckData {
@ -33,15 +33,15 @@ public class FightData implements CheckData {
} }
}; };
/** The map containing the dataFactory per players. */ /** The map containing the data per players. */
private static Map<String, FightData> playersMap = new HashMap<String, FightData>(); private static Map<String, FightData> playersMap = new HashMap<String, FightData>();
/** /**
* Gets the dataFactory of a specified player. * Gets the data of a specified player.
* *
* @param player * @param player
* the player * the player
* @return the dataFactory * @return the data
*/ */
public static FightData getData(final Player player) { public static FightData getData(final Player player) {
if (!playersMap.containsKey(player.getName())) if (!playersMap.containsKey(player.getName()))

View File

@ -32,15 +32,15 @@ public class InventoryData implements CheckData {
} }
}; };
/** The map containing the dataFactory per players. */ /** The map containing the data per players. */
private static Map<String, InventoryData> playersMap = new HashMap<String, InventoryData>(); private static Map<String, InventoryData> playersMap = new HashMap<String, InventoryData>();
/** /**
* Gets the dataFactory of a specified player. * Gets the data of a specified player.
* *
* @param player * @param player
* the player * the player
* @return the dataFactory * @return the data
*/ */
public static InventoryData getData(final Player player) { public static InventoryData getData(final Player player) {
if (!playersMap.containsKey(player.getName())) if (!playersMap.containsKey(player.getName()))

View File

@ -159,7 +159,7 @@ public class InventoryListener implements Listener {
data.instantEatFood = event.getItem().getType(); data.instantEatFood = event.getItem().getType();
data.instantEatLastTime = System.currentTimeMillis(); data.instantEatLastTime = System.currentTimeMillis();
} else { } else {
// Nothing that we are interested in, reset dataFactory. // Nothing that we are interested in, reset data.
data.instantBowLastTime = 0; data.instantBowLastTime = 0;
data.instantEatLastTime = 0; data.instantEatLastTime = 0;
data.instantEatFood = null; data.instantEatFood = null;

View File

@ -20,7 +20,7 @@ import fr.neatmonster.nocheatplus.checks.CheckDataFactory;
* d8888P * d8888P
*/ */
/** /**
* Player specific dataFactory for the moving checks. * Player specific data for the moving checks.
*/ */
public class MovingData implements CheckData { public class MovingData implements CheckData {
@ -32,15 +32,15 @@ public class MovingData implements CheckData {
} }
}; };
/** The map containing the dataFactory per players. */ /** The map containing the data per players. */
private static Map<String, MovingData> playersMap = new HashMap<String, MovingData>(); private static Map<String, MovingData> playersMap = new HashMap<String, MovingData>();
/** /**
* Gets the dataFactory of a specified player. * Gets the data of a specified player.
* *
* @param player * @param player
* the player * the player
* @return the dataFactory * @return the data
*/ */
public static MovingData getData(final Player player) { public static MovingData getData(final Player player) {
if (!playersMap.containsKey(player.getName())) if (!playersMap.containsKey(player.getName()))
@ -103,7 +103,7 @@ public class MovingData implements CheckData {
public Location teleported; public Location teleported;
/** /**
* Clear the dataFactory of the fly checks. * Clear the data of the fly checks.
*/ */
public void clearFlyData() { public void clearFlyData() {
bunnyhopDelay = 0; bunnyhopDelay = 0;
@ -114,7 +114,7 @@ public class MovingData implements CheckData {
} }
/** /**
* Clear the dataFactory of the more packets checks. * Clear the data of the more packets checks.
*/ */
public void clearMorePacketsData() { public void clearMorePacketsData() {
morePacketsSetback = null; morePacketsSetback = null;

View File

@ -177,7 +177,7 @@ public class MovingListener implements Listener {
} }
/** /**
* Just for security, if a player switches between worlds, reset the fly and more packets checks dataFactory, * Just for security, if a player switches between worlds, reset the fly and more packets checks data,
* because it is definitely invalid now. * because it is definitely invalid now.
* *
* @param event * @param event
@ -278,7 +278,7 @@ public class MovingListener implements Listener {
final Player player = event.getPlayer(); final Player player = event.getPlayer();
// Don't care for movements that are very high distance, to another world (such that it is very likely the event // Don't care for movements that are very high distance, to another world (such that it is very likely the event
// dataFactory was modified by another plugin before we got it) or if the player is inside a vehicle. // data was modified by another plugin before we got it) or if the player is inside a vehicle.
if (!event.getFrom().getWorld().equals(event.getTo().getWorld()) if (!event.getFrom().getWorld().equals(event.getTo().getWorld())
|| event.getFrom().distanceSquared(event.getTo()) > 400D || player.isInsideVehicle()) || event.getFrom().distanceSquared(event.getTo()) > 400D || player.isInsideVehicle())
return; return;
@ -286,7 +286,7 @@ public class MovingListener implements Listener {
final MovingData data = MovingData.getData(player); final MovingData data = MovingData.getData(player);
// Just try to estimate velocities over time. Not very precise, but works good enough most of the time. Do // Just try to estimate velocities over time. Not very precise, but works good enough most of the time. Do
// general dataFactory modifications one for each event. // general data modifications one for each event.
if (data.horizontalVelocityCounter > 0D) if (data.horizontalVelocityCounter > 0D)
data.horizontalVelocityCounter--; data.horizontalVelocityCounter--;
else if (data.horizontalFreedom > 0.001D) else if (data.horizontalFreedom > 0.001D)
@ -324,14 +324,14 @@ public class MovingListener implements Listener {
if (newTo == null && noFall.isEnabled(player)) if (newTo == null && noFall.isEnabled(player))
noFall.check(player, from, to); noFall.check(player, from, to);
} else } else
// He isn't handled by any fly check, clear his dataFactory. // He isn't handled by any fly check, clear his data.
data.clearFlyData(); data.clearFlyData();
if (newTo == null && morePackets.isEnabled(player)) if (newTo == null && morePackets.isEnabled(player))
// If he hasn't been stopped by any other check and is handled by the more packets check, execute it. // If he hasn't been stopped by any other check and is handled by the more packets check, execute it.
newTo = morePackets.check(player, from, to); newTo = morePackets.check(player, from, to);
else else
// Otherwise we need to clear his dataFactory. // Otherwise we need to clear his data.
data.clearMorePacketsData(); data.clearMorePacketsData();
// Did one of the checks decide we need a new "to"-location? // Did one of the checks decide we need a new "to"-location?
@ -389,9 +389,9 @@ public class MovingListener implements Listener {
/** /**
* If a player gets teleported, it may have two reasons. Either it was NoCheat or another plugin. If it was * If a player gets teleported, it may have two reasons. Either it was NoCheat or another plugin. If it was
* NoCheatPlus, the target location should match the "dataFactory.teleportedTo" value. * NoCheatPlus, the target location should match the "data.teleportedTo" value.
* *
* On teleports, reset some movement related dataFactory that gets invalid. * On teleports, reset some movement related data that gets invalid.
* *
* @param event * @param event
* the event * the event
@ -414,12 +414,12 @@ public class MovingListener implements Listener {
if (data.teleported != null && data.teleported.equals(event.getTo())) if (data.teleported != null && data.teleported.equals(event.getTo()))
event.setCancelled(false); event.setCancelled(false);
else else
// Only if it wasn't NoCheatPlus, drop dataFactory from more packets check. If it was NoCheatPlus, we don't // Only if it wasn't NoCheatPlus, drop data from more packets check. If it was NoCheatPlus, we don't
// want // want
// players to exploit the fly check teleporting to get rid of the "morepackets" dataFactory. // players to exploit the fly check teleporting to get rid of the "morepackets" data.
data.clearMorePacketsData(); data.clearMorePacketsData();
// Always drop dataFactory from fly checks, as it always loses its validity after teleports. Always! // Always drop data from fly checks, as it always loses its validity after teleports. Always!
data.teleported = null; data.teleported = null;
data.clearFlyData(); data.clearFlyData();
} }
@ -478,7 +478,7 @@ public class MovingListener implements Listener {
* \_/ \___|_| |_|_|\___|_|\___| |_| |_|\___/ \_/ \___| * \_/ \___|_| |_|_|\___|_|\___| |_| |_|\___/ \_/ \___|
*/ */
// Don't care if a player isn't inside the vehicle, for movements that are very high distance or to another // Don't care if a player isn't inside the vehicle, for movements that are very high distance or to another
// world (such that it is very likely the event dataFactory was modified by another plugin before we got it). // world (such that it is very likely the event data was modified by another plugin before we got it).
if (event.getVehicle().getPassenger() == null || !(event.getVehicle().getPassenger() instanceof Player) if (event.getVehicle().getPassenger() == null || !(event.getVehicle().getPassenger() instanceof Player)
|| !event.getFrom().getWorld().equals(event.getTo().getWorld()) || !event.getFrom().getWorld().equals(event.getTo().getWorld())
|| event.getFrom().distanceSquared(event.getTo()) > 400D) || event.getFrom().distanceSquared(event.getTo()) > 400D)
@ -492,7 +492,7 @@ public class MovingListener implements Listener {
// If the player is handled by the more packets vehicle check, execute it. // If the player is handled by the more packets vehicle check, execute it.
newTo = morePacketsVehicle.check(player, event.getFrom(), event.getTo()); newTo = morePacketsVehicle.check(player, event.getFrom(), event.getTo());
else else
// Otherwise we need to clear his dataFactory. // Otherwise we need to clear his data.
MovingData.getData(player).clearMorePacketsData(); MovingData.getData(player).clearMorePacketsData();
// Did one of the checks decide we need a new "to"-location? // Did one of the checks decide we need a new "to"-location?

View File

@ -43,7 +43,7 @@ public class ConfigFile extends YamlConfiguration {
} }
/** /**
* Do this after reading new dataFactory. * Do this after reading new data.
*/ */
public void regenerateActionLists() { public void regenerateActionLists() {
factory = new ActionFactory(((MemorySection) this.get(ConfPaths.STRINGS)).getValues(false)); factory = new ActionFactory(((MemorySection) this.get(ConfPaths.STRINGS)).getValues(false));

View File

@ -130,7 +130,7 @@ public class ExecutionHistory {
} }
} }
/** Store dataFactory between events (time + action + action-counter). **/ /** Store data between events (time + action + action-counter). **/
private final Map<String, Map<Action, ExecutionHistoryEntry>> executionHistories; private final Map<String, Map<Action, ExecutionHistoryEntry>> executionHistories;
/** /**