mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-06 18:50:54 +01:00
Make use of the optimized action lists.
This commit is contained in:
parent
a6003fc820
commit
9f4896b47c
@ -118,7 +118,7 @@ public class BlockBreakConfig extends ACheckConfig {
|
||||
public BlockBreakConfig(final ConfigFile data) {
|
||||
super(data, ConfPaths.BLOCKBREAK);
|
||||
directionCheck = data.getBoolean(ConfPaths.BLOCKBREAK_DIRECTION_CHECK);
|
||||
directionActions = data.getActionList(ConfPaths.BLOCKBREAK_DIRECTION_ACTIONS, Permissions.BLOCKBREAK_DIRECTION);
|
||||
directionActions = data.getOptimizedActionList(ConfPaths.BLOCKBREAK_DIRECTION_ACTIONS, Permissions.BLOCKBREAK_DIRECTION);
|
||||
|
||||
// Fastbreak.
|
||||
fastBreakCheck = data.getBoolean(ConfPaths.BLOCKBREAK_FASTBREAK_CHECK);
|
||||
@ -132,7 +132,7 @@ public class BlockBreakConfig extends ACheckConfig {
|
||||
fastBreakModCreative = data.getInt(ConfPaths.BLOCKBREAK_FASTBREAK_MOD_CREATIVE, 0);
|
||||
fastBreakModSurvival = data.getInt(ConfPaths.BLOCKBREAK_FASTBREAK_MOD_SURVIVAL);
|
||||
// Fastbreak actions, shared.
|
||||
fastBreakActions = data.getActionList(ConfPaths.BLOCKBREAK_FASTBREAK_ACTIONS, Permissions.BLOCKBREAK_FASTBREAK);
|
||||
fastBreakActions = data.getOptimizedActionList(ConfPaths.BLOCKBREAK_FASTBREAK_ACTIONS, Permissions.BLOCKBREAK_FASTBREAK);
|
||||
|
||||
frequencyCheck = data.getBoolean(ConfPaths.BLOCKBREAK_FREQUENCY_CHECK);
|
||||
frequencyBuckets = data.getInt(ConfPaths.BLOCKBREAK_FREQUENCY_BUCKETS_N, 2);
|
||||
@ -142,17 +142,17 @@ public class BlockBreakConfig extends ACheckConfig {
|
||||
frequencyIntervalSurvival = data.getInt(ConfPaths.BLOCKBREAK_FREQUENCY_MOD_SURVIVAL);
|
||||
frequencyShortTermLimit = data.getInt(ConfPaths.BLOCKBREAK_FREQUENCY_SHORTTERM_LIMIT);
|
||||
frequencyShortTermTicks = data.getInt(ConfPaths.BLOCKBREAK_FREQUENCY_SHORTTERM_TICKS);
|
||||
frequencyActions = data.getActionList(ConfPaths.BLOCKBREAK_FREQUENCY_ACTIONS, Permissions.BLOCKBREAK_FREQUENCY);
|
||||
frequencyActions = data.getOptimizedActionList(ConfPaths.BLOCKBREAK_FREQUENCY_ACTIONS, Permissions.BLOCKBREAK_FREQUENCY);
|
||||
|
||||
noSwingCheck = data.getBoolean(ConfPaths.BLOCKBREAK_NOSWING_CHECK);
|
||||
noSwingActions = data.getActionList(ConfPaths.BLOCKBREAK_NOSWING_ACTIONS, Permissions.BLOCKBREAK_NOSWING);
|
||||
noSwingActions = data.getOptimizedActionList(ConfPaths.BLOCKBREAK_NOSWING_ACTIONS, Permissions.BLOCKBREAK_NOSWING);
|
||||
|
||||
reachCheck = data.getBoolean(ConfPaths.BLOCKBREAK_REACH_CHECK);
|
||||
reachActions = data.getActionList(ConfPaths.BLOCKBREAK_REACH_ACTIONS, Permissions.BLOCKBREAK_REACH);
|
||||
reachActions = data.getOptimizedActionList(ConfPaths.BLOCKBREAK_REACH_ACTIONS, Permissions.BLOCKBREAK_REACH);
|
||||
|
||||
wrongBlockCheck = data.getBoolean(ConfPaths.BLOCKBREAK_WRONGBLOCK_CHECK);
|
||||
wrongBLockLevel = data.getInt(ConfPaths.BLOCKBREAK_WRONGBLOCK_LEVEL);
|
||||
wrongBlockActions = data.getActionList(ConfPaths.BLOCKBREAK_WRONGBLOCK_ACTIONS, Permissions.BLOCKBREAK_WRONGBLOCK);
|
||||
wrongBlockActions = data.getOptimizedActionList(ConfPaths.BLOCKBREAK_WRONGBLOCK_ACTIONS, Permissions.BLOCKBREAK_WRONGBLOCK);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -86,11 +86,11 @@ public class BlockInteractConfig extends ACheckConfig {
|
||||
public BlockInteractConfig(final ConfigFile data) {
|
||||
super(data, ConfPaths.BLOCKINTERACT);
|
||||
directionCheck = data.getBoolean(ConfPaths.BLOCKINTERACT_DIRECTION_CHECK);
|
||||
directionActions = data.getActionList(ConfPaths.BLOCKINTERACT_DIRECTION_ACTIONS,
|
||||
directionActions = data.getOptimizedActionList(ConfPaths.BLOCKINTERACT_DIRECTION_ACTIONS,
|
||||
Permissions.BLOCKINTERACT_DIRECTION);
|
||||
|
||||
reachCheck = data.getBoolean(ConfPaths.BLOCKINTERACT_REACH_CHECK);
|
||||
reachActions = data.getActionList(ConfPaths.BLOCKINTERACT_REACH_ACTIONS, Permissions.BLOCKINTERACT_REACH);
|
||||
reachActions = data.getOptimizedActionList(ConfPaths.BLOCKINTERACT_REACH_ACTIONS, Permissions.BLOCKINTERACT_REACH);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -98,22 +98,22 @@ public class BlockPlaceConfig extends ACheckConfig {
|
||||
public BlockPlaceConfig(final ConfigFile data) {
|
||||
super(data, ConfPaths.BLOCKPLACE);
|
||||
directionCheck = data.getBoolean(ConfPaths.BLOCKPLACE_DIRECTION_CHECK);
|
||||
directionActions = data.getActionList(ConfPaths.BLOCKPLACE_DIRECTION_ACTIONS, Permissions.BLOCKPLACE_DIRECTION);
|
||||
directionActions = data.getOptimizedActionList(ConfPaths.BLOCKPLACE_DIRECTION_ACTIONS, Permissions.BLOCKPLACE_DIRECTION);
|
||||
|
||||
fastPlaceCheck = data.getBoolean(ConfPaths.BLOCKPLACE_FASTPLACE_CHECK);
|
||||
fastPlaceExperimental = data.getBoolean(ConfPaths.BLOCKPLACE_FASTPLACE_EXPERIMENTAL);
|
||||
fastPlaceInterval = data.getLong(ConfPaths.BLOCKPLACE_FASTPLACE_INTERVAL);
|
||||
fastPlaceActions = data.getActionList(ConfPaths.BLOCKPLACE_FASTPLACE_ACTIONS, Permissions.BLOCKPLACE_FASTPLACE);
|
||||
fastPlaceActions = data.getOptimizedActionList(ConfPaths.BLOCKPLACE_FASTPLACE_ACTIONS, Permissions.BLOCKPLACE_FASTPLACE);
|
||||
|
||||
noSwingCheck = data.getBoolean(ConfPaths.BLOCKPLACE_NOSWING_CHECK);
|
||||
noSwingActions = data.getActionList(ConfPaths.BLOCKPLACE_NOSWING_ACTIONS, Permissions.BLOCKPLACE_NOSWING);
|
||||
noSwingActions = data.getOptimizedActionList(ConfPaths.BLOCKPLACE_NOSWING_ACTIONS, Permissions.BLOCKPLACE_NOSWING);
|
||||
|
||||
reachCheck = data.getBoolean(ConfPaths.BLOCKPLACE_REACH_CHECK);
|
||||
reachActions = data.getActionList(ConfPaths.BLOCKPLACE_REACH_ACTIONS, Permissions.BLOCKPLACE_REACH);
|
||||
reachActions = data.getOptimizedActionList(ConfPaths.BLOCKPLACE_REACH_ACTIONS, Permissions.BLOCKPLACE_REACH);
|
||||
|
||||
speedCheck = data.getBoolean(ConfPaths.BLOCKPLACE_SPEED_CHECK);
|
||||
speedInterval = data.getLong(ConfPaths.BLOCKPLACE_SPEED_INTERVAL);
|
||||
speedActions = data.getActionList(ConfPaths.BLOCKPLACE_SPEED_ACTIONS, Permissions.BLOCKPLACE_SPEED);
|
||||
speedActions = data.getOptimizedActionList(ConfPaths.BLOCKPLACE_SPEED_ACTIONS, Permissions.BLOCKPLACE_SPEED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -162,16 +162,16 @@ public class ChatConfig extends AsyncCheckConfig {
|
||||
captchaQuestion = config.getString(ConfPaths.CHAT_CAPTCHA_QUESTION);
|
||||
captchaSuccess = config.getString(ConfPaths.CHAT_CAPTCHA_SUCCESS);
|
||||
captchaTries = config.getInt(ConfPaths.CHAT_CAPTCHA_TRIES);
|
||||
captchaActions = config.getActionList(ConfPaths.CHAT_CAPTCHA_ACTIONS, Permissions.CHAT_CAPTCHA);
|
||||
captchaActions = config.getOptimizedActionList(ConfPaths.CHAT_CAPTCHA_ACTIONS, Permissions.CHAT_CAPTCHA);
|
||||
|
||||
colorCheck = config.getBoolean(ConfPaths.CHAT_COLOR_CHECK);
|
||||
colorActions = config.getActionList(ConfPaths.CHAT_COLOR_ACTIONS, Permissions.CHAT_COLOR);
|
||||
colorActions = config.getOptimizedActionList(ConfPaths.CHAT_COLOR_ACTIONS, Permissions.CHAT_COLOR);
|
||||
|
||||
commandsCheck = config.getBoolean(ConfPaths.CHAT_COMMANDS_CHECK);
|
||||
commandsLevel = config.getDouble(ConfPaths.CHAT_COMMANDS_LEVEL);
|
||||
commandsShortTermTicks = config.getInt(ConfPaths.CHAT_COMMANDS_SHORTTERM_TICKS);
|
||||
commandsShortTermLevel = config.getDouble(ConfPaths.CHAT_COMMANDS_SHORTTERM_LEVEL);;
|
||||
commandsActions = config.getActionList(ConfPaths.CHAT_COMMANDS_ACTIONS, Permissions.CHAT_COMMANDS);
|
||||
commandsActions = config.getOptimizedActionList(ConfPaths.CHAT_COMMANDS_ACTIONS, Permissions.CHAT_COMMANDS);
|
||||
|
||||
|
||||
textCheck = config.getBoolean(ConfPaths.CHAT_TEXT_CHECK);
|
||||
@ -185,7 +185,7 @@ public class ChatConfig extends AsyncCheckConfig {
|
||||
textFreqShortTermWeight = (float) config.getDouble(ConfPaths.CHAT_TEXT_FREQ_SHORTTERM_WEIGHT);
|
||||
textFreqShortTermLevel = (float) config.getDouble(ConfPaths.CHAT_TEXT_FREQ_SHORTTERM_LEVEL);
|
||||
textFreqShortTermMin = (float) config.getDouble(ConfPaths.CHAT_TEXT_FREQ_SHORTTERM_MIN);
|
||||
textFreqShortTermActions = config.getActionList(ConfPaths.CHAT_TEXT_FREQ_SHORTTERM_ACTIONS, Permissions.CHAT_TEXT);
|
||||
textFreqShortTermActions = config.getOptimizedActionList(ConfPaths.CHAT_TEXT_FREQ_SHORTTERM_ACTIONS, Permissions.CHAT_TEXT);
|
||||
textMessageLetterCount = (float) config.getDouble(ConfPaths.CHAT_TEXT_MSG_LETTERCOUNT);
|
||||
textMessagePartition = (float) config.getDouble(ConfPaths.CHAT_TEXT_MSG_PARTITION);
|
||||
textMessageUpperCase = (float) config.getDouble(ConfPaths.CHAT_TEXT_MSG_UPPERCASE);
|
||||
@ -203,7 +203,7 @@ public class ChatConfig extends AsyncCheckConfig {
|
||||
textFreqNormLevel = config.getDouble(ConfPaths.CHAT_TEXT_FREQ_NORM_LEVEL);
|
||||
textEngineMaximum = config.getBoolean(ConfPaths.CHAT_TEXT_ENGINE_MAXIMUM, true);
|
||||
textDebug = config.getBoolean(ConfPaths.CHAT_TEXT_DEBUG, false);
|
||||
textFreqNormActions = config.getActionList(ConfPaths.CHAT_TEXT_FREQ_NORM_ACTIONS, Permissions.CHAT_TEXT);
|
||||
textFreqNormActions = config.getOptimizedActionList(ConfPaths.CHAT_TEXT_FREQ_NORM_ACTIONS, Permissions.CHAT_TEXT);
|
||||
|
||||
chatWarningCheck = config.getBoolean(ConfPaths.CHAT_WARNING_CHECK);
|
||||
chatWarningLevel = (float) config.getDouble(ConfPaths.CHAT_WARNING_LEVEL);
|
||||
@ -223,7 +223,7 @@ public class ChatConfig extends AsyncCheckConfig {
|
||||
relogWarningMessage = config.getString(ConfPaths.CHAT_RELOG_WARNING_MESSAGE);
|
||||
relogWarningNumber = config.getInt(ConfPaths.CHAT_RELOG_WARNING_NUMBER);
|
||||
relogWarningTimeout = config.getLong(ConfPaths.CHAT_RELOG_WARNING_TIMEOUT);
|
||||
relogActions = config.getActionList(ConfPaths.CHAT_RELOG_ACTIONS, Permissions.CHAT_RELOG);
|
||||
relogActions = config.getOptimizedActionList(ConfPaths.CHAT_RELOG_ACTIONS, Permissions.CHAT_RELOG);
|
||||
|
||||
opInConsoleOnly = config.getBoolean(ConfPaths.MISCELLANEOUS_OPINCONSOLEONLY);
|
||||
|
||||
|
@ -69,7 +69,7 @@ public class CombinedConfig extends ACheckConfig {
|
||||
super(config, ConfPaths.COMBINED);
|
||||
improbableCheck = config.getBoolean(ConfPaths.COMBINED_IMPROBABLE_CHECK, false);
|
||||
improbableLevel = (float) config.getDouble(ConfPaths.COMBINED_IMPROBABLE_LEVEL, 300);
|
||||
improbableActions = config.getActionList(ConfPaths.COMBINED_IMPROBABLE_ACTIONS, Permissions.COMBINED_IMPROBABLE);
|
||||
improbableActions = config.getOptimizedActionList(ConfPaths.COMBINED_IMPROBABLE_ACTIONS, Permissions.COMBINED_IMPROBABLE);
|
||||
|
||||
invulnerableCheck = config.getBoolean(ConfPaths.COMBINED_INVULNERABLE_CHECK);
|
||||
invulnerableInitialTicksJoin = config.getInt(ConfPaths.COMBINED_INVULNERABLE_INITIALTICKS_JOIN);
|
||||
|
@ -119,35 +119,35 @@ public class FightConfig extends ACheckConfig {
|
||||
super(data, ConfPaths.FIGHT);
|
||||
angleCheck = data.getBoolean(ConfPaths.FIGHT_ANGLE_CHECK);
|
||||
angleThreshold = data.getInt(ConfPaths.FIGHT_ANGLE_THRESHOLD);
|
||||
angleActions = data.getActionList(ConfPaths.FIGHT_ANGLE_ACTIONS, Permissions.FIGHT_ANGLE);
|
||||
angleActions = data.getOptimizedActionList(ConfPaths.FIGHT_ANGLE_ACTIONS, Permissions.FIGHT_ANGLE);
|
||||
|
||||
criticalCheck = data.getBoolean(ConfPaths.FIGHT_CRITICAL_CHECK);
|
||||
criticalFallDistance = data.getDouble(ConfPaths.FIGHT_CRITICAL_FALLDISTANCE);
|
||||
criticalVelocity = data.getDouble(ConfPaths.FIGHT_CRITICAL_VELOCITY);
|
||||
criticalActions = data.getActionList(ConfPaths.FIGHT_CRITICAL_ACTIONS, Permissions.FIGHT_CRITICAL);
|
||||
criticalActions = data.getOptimizedActionList(ConfPaths.FIGHT_CRITICAL_ACTIONS, Permissions.FIGHT_CRITICAL);
|
||||
|
||||
directionCheck = data.getBoolean(ConfPaths.FIGHT_DIRECTION_CHECK);
|
||||
directionPenalty = data.getLong(ConfPaths.FIGHT_DIRECTION_PENALTY);
|
||||
directionActions = data.getActionList(ConfPaths.FIGHT_DIRECTION_ACTIONS, Permissions.FIGHT_DIRECTION);
|
||||
directionActions = data.getOptimizedActionList(ConfPaths.FIGHT_DIRECTION_ACTIONS, Permissions.FIGHT_DIRECTION);
|
||||
|
||||
godModeCheck = data.getBoolean(ConfPaths.FIGHT_GODMODE_CHECK);
|
||||
godModeActions = data.getActionList(ConfPaths.FIGHT_GODMODE_ACTIONS, Permissions.FIGHT_GODMODE);
|
||||
godModeActions = data.getOptimizedActionList(ConfPaths.FIGHT_GODMODE_ACTIONS, Permissions.FIGHT_GODMODE);
|
||||
|
||||
knockbackCheck = data.getBoolean(ConfPaths.FIGHT_KNOCKBACK_CHECK);
|
||||
knockbackInterval = data.getLong(ConfPaths.FIGHT_KNOCKBACK_INTERVAL);
|
||||
knockbackActions = data.getActionList(ConfPaths.FIGHT_KNOCKBACK_ACTIONS, Permissions.FIGHT_KNOCKBACK);
|
||||
knockbackActions = data.getOptimizedActionList(ConfPaths.FIGHT_KNOCKBACK_ACTIONS, Permissions.FIGHT_KNOCKBACK);
|
||||
|
||||
noSwingCheck = data.getBoolean(ConfPaths.FIGHT_NOSWING_CHECK);
|
||||
noSwingActions = data.getActionList(ConfPaths.FIGHT_NOSWING_ACTIONS, Permissions.FIGHT_NOSWING);
|
||||
noSwingActions = data.getOptimizedActionList(ConfPaths.FIGHT_NOSWING_ACTIONS, Permissions.FIGHT_NOSWING);
|
||||
|
||||
reachCheck = data.getBoolean(ConfPaths.FIGHT_REACH_CHECK);
|
||||
reachPenalty = data.getLong(ConfPaths.FIGHT_REACH_PENALTY);
|
||||
reachPrecision = data.getBoolean(ConfPaths.FIGHT_REACH_PRECISION);
|
||||
reachReduce = data.getBoolean(ConfPaths.FIGHT_REACH_REDUCE);
|
||||
reachActions = data.getActionList(ConfPaths.FIGHT_REACH_ACTIONS, Permissions.FIGHT_REACH);
|
||||
reachActions = data.getOptimizedActionList(ConfPaths.FIGHT_REACH_ACTIONS, Permissions.FIGHT_REACH);
|
||||
|
||||
selfHitCheck = data.getBoolean(ConfPaths.FIGHT_SELFHIT_CHECK);
|
||||
selfHitActions = data.getActionList(ConfPaths.FIGHT_SELFHIT_ACTIONS, Permissions.FIGHT_SELFHIT);
|
||||
selfHitActions = data.getOptimizedActionList(ConfPaths.FIGHT_SELFHIT_ACTIONS, Permissions.FIGHT_SELFHIT);
|
||||
|
||||
speedCheck = data.getBoolean(ConfPaths.FIGHT_SPEED_CHECK);
|
||||
speedLimit = data.getInt(ConfPaths.FIGHT_SPEED_LIMIT);
|
||||
@ -156,7 +156,7 @@ public class FightConfig extends ACheckConfig {
|
||||
speedBucketFactor = (float) data.getDouble(ConfPaths.FIGHT_SPEED_BUCKETS_FACTOR, 1f);
|
||||
speedShortTermLimit = data.getInt(ConfPaths.FIGHT_SPEED_SHORTTERM_LIMIT);
|
||||
speedShortTermTicks = data.getInt(ConfPaths.FIGHT_SPEED_SHORTTERM_TICKS);
|
||||
speedActions = data.getActionList(ConfPaths.FIGHT_SPEED_ACTIONS, Permissions.FIGHT_SPEED);
|
||||
speedActions = data.getOptimizedActionList(ConfPaths.FIGHT_SPEED_ACTIONS, Permissions.FIGHT_SPEED);
|
||||
|
||||
|
||||
yawRateCheck = data.getBoolean(ConfPaths.FIGHT_YAWRATE_CHECK, true);
|
||||
|
@ -103,24 +103,24 @@ public class InventoryConfig extends ACheckConfig {
|
||||
dropCheck = data.getBoolean(ConfPaths.INVENTORY_DROP_CHECK);
|
||||
dropLimit = data.getInt(ConfPaths.INVENTORY_DROP_LIMIT);
|
||||
dropTimeFrame = data.getLong(ConfPaths.INVENTORY_DROP_TIMEFRAME);
|
||||
dropActions = data.getActionList(ConfPaths.INVENTORY_DROP_ACTIONS,
|
||||
dropActions = data.getOptimizedActionList(ConfPaths.INVENTORY_DROP_ACTIONS,
|
||||
Permissions.INVENTORY_DROP);
|
||||
|
||||
fastClickCheck = data.getBoolean(ConfPaths.INVENTORY_FASTCLICK_CHECK);
|
||||
fastClickSpareCreative = data.getBoolean(ConfPaths.INVENTORY_FASTCLICK_SPARECREATIVE);
|
||||
fastClickActions = data.getActionList(
|
||||
fastClickActions = data.getOptimizedActionList(
|
||||
ConfPaths.INVENTORY_FASTCLICK_ACTIONS,
|
||||
Permissions.INVENTORY_FASTCLICK);
|
||||
|
||||
instantBowCheck = data.getBoolean(ConfPaths.INVENTORY_INSTANTBOW_CHECK);
|
||||
instantBowStrict = data.getBoolean(ConfPaths.INVENTORY_INSTANTBOW_STRICT);
|
||||
instantBowDelay = data.getInt(ConfPaths.INVENTORY_INSTANTBOW_DELAY);
|
||||
instantBowActions = data.getActionList(
|
||||
instantBowActions = data.getOptimizedActionList(
|
||||
ConfPaths.INVENTORY_INSTANTBOW_ACTIONS,
|
||||
Permissions.INVENTORY_INSTANTBOW);
|
||||
|
||||
instantEatCheck = data.getBoolean(ConfPaths.INVENTORY_INSTANTEAT_CHECK);
|
||||
instantEatActions = data.getActionList(
|
||||
instantEatActions = data.getOptimizedActionList(
|
||||
ConfPaths.INVENTORY_INSTANTEAT_ACTIONS,
|
||||
Permissions.INVENTORY_INSTANTEAT);
|
||||
|
||||
|
@ -119,13 +119,13 @@ public class MovingConfig extends ACheckConfig {
|
||||
creativeFlyHorizontalSpeed = data.getInt(ConfPaths.MOVING_CREATIVEFLY_HORIZONTALSPEED);
|
||||
creativeFlyMaxHeight = data.getInt(ConfPaths.MOVING_CREATIVEFLY_MAXHEIGHT);
|
||||
creativeFlyVerticalSpeed = data.getInt(ConfPaths.MOVING_CREATIVEFLY_VERTICALSPEED);
|
||||
creativeFlyActions = data.getActionList(ConfPaths.MOVING_CREATIVEFLY_ACTIONS, Permissions.MOVING_CREATIVEFLY);
|
||||
creativeFlyActions = data.getOptimizedActionList(ConfPaths.MOVING_CREATIVEFLY_ACTIONS, Permissions.MOVING_CREATIVEFLY);
|
||||
|
||||
morePacketsCheck = data.getBoolean(ConfPaths.MOVING_MOREPACKETS_CHECK);
|
||||
morePacketsActions = data.getActionList(ConfPaths.MOVING_MOREPACKETS_ACTIONS, Permissions.MOVING_MOREPACKETS);
|
||||
morePacketsActions = data.getOptimizedActionList(ConfPaths.MOVING_MOREPACKETS_ACTIONS, Permissions.MOVING_MOREPACKETS);
|
||||
|
||||
morePacketsVehicleCheck = data.getBoolean(ConfPaths.MOVING_MOREPACKETSVEHICLE_CHECK);
|
||||
morePacketsVehicleActions = data.getActionList(ConfPaths.MOVING_MOREPACKETSVEHICLE_ACTIONS,
|
||||
morePacketsVehicleActions = data.getOptimizedActionList(ConfPaths.MOVING_MOREPACKETSVEHICLE_ACTIONS,
|
||||
Permissions.MOVING_MOREPACKETS);
|
||||
|
||||
noFallCheck = data.getBoolean(ConfPaths.MOVING_NOFALL_CHECK);
|
||||
@ -133,7 +133,7 @@ public class MovingConfig extends ACheckConfig {
|
||||
// noFallActions = data.getActionList(ConfPaths.MOVING_NOFALL_ACTIONS, Permissions.MOVING_NOFALL);
|
||||
|
||||
passableCheck = data.getBoolean(ConfPaths.MOVING_PASSABLE_CHECK);
|
||||
passableActions = data.getActionList(ConfPaths.MOVING_PASSABLE_ACTIONS, Permissions.MOVING_PASSABLE);
|
||||
passableActions = data.getOptimizedActionList(ConfPaths.MOVING_PASSABLE_ACTIONS, Permissions.MOVING_PASSABLE);
|
||||
|
||||
survivalFlyCheck = data.getBoolean(ConfPaths.MOVING_SURVIVALFLY_CHECK);
|
||||
// Default values are specified here because this settings aren't showed by default into the configuration file.
|
||||
@ -147,7 +147,7 @@ public class MovingConfig extends ACheckConfig {
|
||||
survivalFlyAccountingH = data.getBoolean(ConfPaths.MOVING_SURVIVALFLY_EXTENDED_HACC, false);
|
||||
survivalFlyAccountingV = data.getBoolean(ConfPaths.MOVING_SURVIVALFLY_EXTENDED_VACC);
|
||||
survivalFlyVLFreeze = data.getLong(ConfPaths.MOVING_SURVIVALFLY_VLFREEZE, 2000L);
|
||||
survivalFlyActions = data.getActionList(ConfPaths.MOVING_SURVIVALFLY_ACTIONS, Permissions.MOVING_SURVIVALFLY);
|
||||
survivalFlyActions = data.getOptimizedActionList(ConfPaths.MOVING_SURVIVALFLY_ACTIONS, Permissions.MOVING_SURVIVALFLY);
|
||||
|
||||
yOnGround = data.getDouble(ConfPaths.MOVING_YONGROUND, 0.001, 2.0, 0.0626); // sqrt(1/256), see: NetServerHandler.
|
||||
noFallyOnGround = data.getDouble(ConfPaths.MOVING_NOFALL_YONGROUND, 0.001, 2.0, 0.3);
|
||||
|
@ -30,7 +30,7 @@ public class ConfigFile extends YamlConfiguration {
|
||||
private ActionFactory factory;
|
||||
|
||||
/**
|
||||
* A convenience method to get action lists from the configuration.
|
||||
* A convenience method to get an optimized action list from the configuration.
|
||||
*
|
||||
* @param path
|
||||
* the path
|
||||
@ -38,7 +38,24 @@ public class ConfigFile extends YamlConfiguration {
|
||||
* the permission
|
||||
* @return the action list
|
||||
*/
|
||||
public ActionList getActionList(final String path, final String permission) {
|
||||
public ActionList getOptimizedActionList(final String path, final String permission)
|
||||
{
|
||||
final String value = this.getString(path);
|
||||
return factory.createActionList(value, permission).getOptimizedCopy(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* A convenience method to get default action lists from the configuration, without
|
||||
* applying any optimization.
|
||||
*
|
||||
* @param path
|
||||
* the path
|
||||
* @param permission
|
||||
* the permission
|
||||
* @return the action list
|
||||
*/
|
||||
public ActionList getDefaultActionList(final String path, final String permission)
|
||||
{
|
||||
final String value = this.getString(path);
|
||||
return factory.createActionList(value, permission);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user