From 71e8638a948deb14e1f7978be4f1d1e560da396f Mon Sep 17 00:00:00 2001 From: gravitylow Date: Wed, 5 Feb 2014 21:52:52 -0500 Subject: [PATCH] Magic documentation cleanup --- .../config/holders/yaml/YamlLangHolder.java | 2 - .../anticheat/config/providers/Magic.java | 176 +++++++++--------- 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/src/main/java/net/gravitydevelopment/anticheat/config/holders/yaml/YamlLangHolder.java b/src/main/java/net/gravitydevelopment/anticheat/config/holders/yaml/YamlLangHolder.java index 0b0f04d..8afcb34 100644 --- a/src/main/java/net/gravitydevelopment/anticheat/config/holders/yaml/YamlLangHolder.java +++ b/src/main/java/net/gravitydevelopment/anticheat/config/holders/yaml/YamlLangHolder.java @@ -24,8 +24,6 @@ import net.gravitydevelopment.anticheat.config.ConfigurationFile; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; -import java.sql.PreparedStatement; -import java.sql.SQLException; import java.util.List; public class YamlLangHolder extends ConfigurationFile implements InvocationHandler { diff --git a/src/main/java/net/gravitydevelopment/anticheat/config/providers/Magic.java b/src/main/java/net/gravitydevelopment/anticheat/config/providers/Magic.java index 3dd3659..69e3168 100644 --- a/src/main/java/net/gravitydevelopment/anticheat/config/providers/Magic.java +++ b/src/main/java/net/gravitydevelopment/anticheat/config/providers/Magic.java @@ -22,345 +22,347 @@ package net.gravitydevelopment.anticheat.config.providers; * Magic number class. Modifications to values in magic.yml will be accepted here. *

* Note that although each value is documented, changing it may have unintended side-effects. For instance, setting something to 0 that the plugin then uses as a dividend will result in an error.
- * Also realize that the smaller a value is, the less you should change it; it's probably small for a reason. The larger a value is, the safer it is to probably change it. + * Also realize that the smaller (more precise) a value is, the less you should change it; it's probably small for a reason. The larger a value is, the safer it is to make larger modifications to it. + *

+ * How to read the value documentation: *

- * How to read the value documentation:
* First, you will see a description of the value. Then, you will see a type:
- * Type SYSTEM: This is a millisecond value used to compare past and future events with the current system time. Remember, 1000 ms = 1 second.
+ * Type SYSTEM: This is a millisecond value used to compare past and future events with the current SYSTEM time. Remember, 1000 ms = 1 second.
* Type INTEGER: This is a regular number. It's typically used as something trivial, such as how many times X event can occur.
* Type DOUBLE: This is a number that has a decimal in it. It's typically used to evaluate speed or distance. *

- * After the type, you may see a recommendation labeled as '+Leniency'. This means 'In order to add leniency to this value, do X'
- * The suggestion for adding leniency will either be to INCREASE or DECREASE the variable. Doing what it suggests will cause the system to not judge the people being checked so vigorously. + * After the type, you may see a recommendation labeled as 'Leniency'. This means 'In order to add leniency to this value, do X'
+ * The suggestion for adding leniency will either be to INCREASE or DECREASE the variable. Doing what it suggests will cause the SYSTEM to not judge the people being checked so vigorously.
+ * Some values may not have a leniency recommendation because they are internal numbers used for running checks. Values without these recommendations would be best left alone. */ public interface Magic { /** - * Time to exempt a player from moving because of entering/exiting a vehicle; Type=system, +Leniency=Increase. + * Time to exempt a player from moving because of entering/exiting a vehicle; Type=SYSTEM, Leniency=INCREASE. */ public int ENTERED_EXITED_TIME(); /** - * Time to exempt a player from moving because of entering/exiting sneak mode; Type=system, +Leniency=Increase. + * Time to exempt a player from moving because of entering/exiting sneak mode; Type=SYSTEM, Leniency=INCREASE. */ public int SNEAK_TIME(); /** - * Time to exempt a player from moving because of teleporting; Type=system, +Leniency=Increase. + * Time to exempt a player from moving because of teleporting; Type=SYSTEM, Leniency=INCREASE. */ public int TELEPORT_TIME(); /** - * Time to exempt a player from moving because of exiting fly mode; Type=system, +Leniency=Increase. + * Time to exempt a player from moving because of exiting fly mode; Type=SYSTEM, Leniency=INCREASE. */ public int EXIT_FLY_TIME(); /** - * Time to exempt a player from moving because of joining the server; Type=system, +Leniency=Increase. + * Time to exempt a player from moving because of joining the server; Type=SYSTEM, Leniency=INCREASE. */ public int JOIN_TIME(); /** - * Time to exempt a player from fastbreak check because of using instant break; Type=seconds, +Leniency=Increase. + * Time to exempt a player from fastbreak check because of using instant break; Type=INTEGER, Leniency=INCREASE. */ public int INSTANT_BREAK_TIME(); /** - * Time to exempt a player from moving because of taking damage; Type=system, +Leniency=Increase. + * Time to exempt a player from moving because of taking damage; Type=SYSTEM, Leniency=INCREASE. */ public int DAMAGE_TIME(); /** - * Time to exempt a player from moving because of taking damage with knockback effects; Type=system, +Leniency=Increase. + * Time to exempt a player from moving because of taking damage with knockback effects; Type=SYSTEM, Leniency=INCREASE. */ public int KNOCKBACK_DAMAGE_TIME(); /** - * Time to exempt a player from moving because of taking damage from an explosion; Type=system, +Leniency=Increase. + * Time to exempt a player from moving because of taking damage from an explosion; Type=SYSTEM, Leniency=INCREASE. */ public int EXPLOSION_DAMAGE_TIME(); /** - * Minimum time it takes to fire X projectiles; Type=system, +Leniency=Decrease. + * Minimum time it takes to fire X projectiles; Type=SYSTEM, Leniency=DECREASE. */ public int PROJECTILE_TIME_MIN(); /** - * Number of projectiles to wait for before checking how long they took to fire off; Type=integer. + * Number of projectiles to wait for before checking how long they took to fire off; Type=INTEGER. */ public int PROJECTILE_CHECK(); /** - * Minimum time it takes to drop X items; Type=system, +Leniency=Decrease. + * Minimum time it takes to drop X items; Type=SYSTEM, Leniency=DECREASE. */ public int DROP_TIME_MIN(); /** - * Number of item drops to wait for before checking how long they took to drop; Type=integer. + * Number of item drops to wait for before checking how long they took to drop; Type=INTEGER. */ public int DROP_CHECK(); /** - * Max number of blocks that can be broken in a given time; Type=integer, +Leniency=Increase. + * Max number of blocks that can be broken in a given time; Type=INTEGER, Leniency=INCREASE. */ public int FASTBREAK_LIMIT(); /** - * Time to wait before checking block breaks; Type=system, +Leniency=Increase. + * Time to wait before checking block breaks; Type=SYSTEM, Leniency=INCREASE. */ public int FASTBREAK_TIMEMAX(); /** - * Time to wait before checking block breaks in creative mode; Type=system, +Leniency=Increase. + * Time to wait before checking block breaks in creative mode; Type=SYSTEM, Leniency=INCREASE. */ public int FASTBREAK_TIMEMAX_CREATIVE(); /** - * Number of times fastbreak can be observed before taking action; Type=integer, +Leniency=Increase. + * Number of times fastbreak can be observed before taking action; Type=INTEGER, Leniency=INCREASE. */ public int FASTBREAK_MAXVIOLATIONS(); /** - * Number of times fastbreak can be observed before taking action in creative mode; Type=integer, +Leniency=Increase. + * Number of times fastbreak can be observed before taking action in creative mode; Type=INTEGER, Leniency=INCREASE. */ public int FASTBREAK_MAXVIOLATIONS_CREATIVE(); /** - * Time a player is forced to wait after fastbreak has been detected; Type=system, +Leniency=Decrease. + * Time a player is forced to wait after fastbreak has been detected; Type=SYSTEM, Leniency=DECREASE. */ public int FASTBREAK_MAXVIOLATIONTIME(); /** - * Number of blocks that can be broken without being hit before taking action; Type=integer, +Leniency=Increase. + * Number of blocks that can be broken without being hit before taking action; Type=INTEGER, Leniency=INCREASE. */ public int FASTPLACE_ZEROLIMIT(); /** - * Minimum time in between block places; Type=system, +Leniency=Decrease. + * Minimum time in between block places; Type=SYSTEM, Leniency=DECREASE. */ public int FASTPLACE_TIMEMIN(); /** - * Number of times fastplace can be observed before taking action; Type=integer, +Leniency=Increase. + * Number of times fastplace can be observed before taking action; Type=INTEGER, Leniency=INCREASE. */ public int FASTPLACE_MAXVIOLATIONS(); /** - * Number of times fastplace can be observed before taking action in creative mode; Type=integer, +Leniency=Increase. + * Number of times fastplace can be observed before taking action in creative mode; Type=INTEGER, Leniency=INCREASE. */ public int FASTPLACE_MAXVIOLATIONS_CREATIVE(); /** - * Time a player is forced to wait after fastplace has been detected; Type=system, +Leniency=Decrease. + * Time a player is forced to wait after fastplace has been detected; Type=SYSTEM, Leniency=DECREASE. */ public int FASTPLACE_MAXVIOLATIONTIME(); /** - * Number of times required to punch a block before it breaks; Type=integer, +Leniency=Decrease. + * Number of times required to punch a block before it breaks; Type=INTEGER, Leniency=DECREASE. */ public int BLOCK_PUNCH_MIN(); /** - * Number of command spam violations before action one is executed; Type=integer, +Leniency=Increase. + * Number of command spam violations before action one is executed; Type=INTEGER, Leniency=INCREASE. */ public int COMMAND_ACTION_ONE_LEVEL(); /** - * Number of command spam violations before action two is executed; Type=integer, +Leniency=Increase. + * Number of command spam violations before action two is executed; Type=INTEGER, Leniency=INCREASE. */ public int COMMAND_ACTION_TWO_LEVEL(); /** - * Number of chat spam violations before action one is executed; Type=integer, +Leniency=Increase. + * Number of chat spam violations before action one is executed; Type=INTEGER, Leniency=INCREASE. */ public int CHAT_ACTION_ONE_LEVEL(); /** - * Number of chat spam violations before action two is executed; Type=integer, +Leniency=Increase. + * Number of chat spam violations before action two is executed; Type=INTEGER, Leniency=INCREASE. */ public int CHAT_ACTION_TWO_LEVEL(); /** - * Number of times a player can be caught in-flight before action is taken; Type=integer, +Leniency=Increase. + * Number of times a player can be caught in-flight before action is taken; Type=INTEGER, Leniency=INCREASE. */ public int FLIGHT_LIMIT(); /** - * How many blocks you can travel before action is taken; Type=integer, +Leniency=Increase. + * How many blocks you can travel before action is taken; Type=INTEGER, Leniency=INCREASE. */ public double FLIGHT_BLOCK_LIMIT(); /** - * Maximum speed that a player can climb a waterfall; Type=double, +Leniency=Increase. + * Maximum speed that a player can climb a waterfall; Type=DOUBLE, Leniency=INCREASE. */ public double WATER_CLIMB_MAX(); /** - * Number of times a player can fly on the y-axis before action is taken; Type=integer, +Leniency=Increase. + * Number of times a player can fly on the y-axis before action is taken; Type=INTEGER, Leniency=INCREASE. */ public int Y_MAXVIOLATIONS(); /** - * Time a player is forced to wait after flying on the y-axis; Type=system, +Leniency=Decrease. + * Time a player is forced to wait after flying on the y-axis; Type=SYSTEM, Leniency=DECREASE. */ public int Y_MAXVIOTIME(); /** - * Number of times a player can fail a velocity check before action is taken; Type=integer, +Leniency=Increase. + * Number of times a player can fail a velocity check before action is taken; Type=INTEGER, Leniency=INCREASE. */ public int VELOCITY_TIME(); /** - * Time used to schedule increasing a players velocity count - probably not touching this would be good; Type=integer. + * Time used to schedule increasing a players velocity count - probably not touching this would be good; Type=INTEGER. */ public int VELOCITY_SCHETIME(); /** - * Maximum time a player is considered to have a change in velocity; Type=system, +Leniency=Increase. + * Maximum time a player is considered to have a change in velocity; Type=SYSTEM, Leniency=INCREASE. */ public int VELOCITY_CHECKTIME(); /** - * Time to extend a player's velocity count by; Type=system, +Leniency=Increase. + * Time to extend a player's velocity count by; Type=SYSTEM, Leniency=INCREASE. */ public int VELOCITY_PREVENT(); /** - * Number of times a player can fail the velocity check before action is taken; Type=integer, +Leniency=Increase. + * Number of times a player can fail the velocity check before action is taken; Type=INTEGER, Leniency=INCREASE. */ public int VELOCITY_MAXTIMES(); /** - * Number of times a player can fail the nofall check before action is taken; Type=integer, +Leniency=Increase. + * Number of times a player can fail the nofall check before action is taken; Type=INTEGER, Leniency=INCREASE. */ public int NOFALL_LIMIT(); /** - * Number of times a player can fail the ascension check before action is taken; Type=integer, +Leniency=Increase. + * Number of times a player can fail the ascension check before action is taken; Type=INTEGER, Leniency=INCREASE. */ public int ASCENSION_COUNT_MAX(); /** - * Number of times a player can fail the ascension check while in water before action is taken; Type=integer, +Leniency=Increase. + * Number of times a player can fail the ascension check while in water before action is taken; Type=INTEGER, Leniency=INCREASE. */ public int WATER_ASCENSION_VIOLATION_MAX(); /** - * Number of times a player can be caught speeding in water before action is taken; Type=integer, +Leniency=Increase. + * Number of times a player can be caught speeding in water before action is taken; Type=INTEGER, Leniency=INCREASE. */ public int WATER_SPEED_VIOLATION_MAX(); /** - * Number of times a player can sprint without proper food level before action is taken; Type=integer, +Leniency=Increase. + * Number of times a player can sprint without proper food level before action is taken; Type=INTEGER, Leniency=INCREASE. */ public int SPRINT_FOOD_MIN(); /** - * Maximum times a player can interact between animations; Type=integer, +Leniency=Increase. + * Maximum times a player can interact between animations; Type=INTEGER, Leniency=INCREASE. */ public int ANIMATION_INTERACT_MAX(); /** - * Minimum time between animations; Type=system, +Leniency=Increase. + * Minimum time between animations; Type=SYSTEM, Leniency=INCREASE. */ public int ANIMATION_MIN(); /** - * Minimum time between commands; Type=system, +Leniency=Decrease. + * Minimum time between commands; Type=SYSTEM, Leniency=DECREASE. */ public int COMMAND_MIN(); /** - * Minimum time before repeating a command is ignored; Type=system, +Leniency=Decrease. + * Minimum time before repeating a command is ignored; Type=SYSTEM, Leniency=DECREASE. */ public int COMMAND_REPEAT_MIN(); /** - * Minimum time between chats; Type=system, +Leniency=Increase. + * Minimum time between chats; Type=SYSTEM, Leniency=INCREASE. */ public int CHAT_MIN(); /** - * Time before repeating yourself in chat is ignored; Type=system, +Leniency=Increase. + * Time before repeating yourself in chat is ignored; Type=SYSTEM, Leniency=INCREASE. */ public int CHAT_REPEAT_MIN(); /** - * Maximum speed you can travel while sprinting; Type=double, +Leniency=Increase. + * Maximum speed you can travel while sprinting; Type=DOUBLE, Leniency=INCREASE. */ public double SPRINT_MIN(); /** - * Minimum time in between block breaks; Type=seconds, +Leniency=Decrease. + * Minimum time in between block breaks; Type=INTEGER, Leniency=DECREASE. */ public double BLOCK_BREAK_MIN(); /** - * Minimum time in between block placing; Type=seconds, +Leniency=Decrease. + * Minimum time in between block placing; Type=INTEGER, Leniency=DECREASE. */ public double BLOCK_PLACE_MIN(); /** - * Minimum time in between healing; Type=system, +Leniency=Decrease. + * Minimum time in between healing; Type=SYSTEM, Leniency=DECREASE. */ public int HEAL_TIME_MIN(); /** - * Minimum time in between eating; Type=system, +Leniency=Decrease. + * Minimum time in between eating; Type=SYSTEM, Leniency=DECREASE. */ public int EAT_TIME_MIN(); /** - * Maximum percent error between predicted bow force and actual bow force; Type=double, +Leniency=Increase. + * Maximum percent error between predicted bow force and actual bow force; Type=DOUBLE, Leniency=INCREASE. */ public double BOW_ERROR(); /** - * Minimum distance a player can break a block from; Type=double, +Leniency=Increase. + * Minimum distance a player can break a block from; Type=DOUBLE, Leniency=INCREASE. */ public double BLOCK_MAX_DISTANCE(); /** - * Minimum distance a player can break a block from in creative mode; Type=double, +Leniency=Increase. + * Minimum distance a player can break a block from in creative mode; Type=DOUBLE, Leniency=INCREASE. */ public double BLOCK_MAX_DISTANCE_CREATIVE(); /** - * Minimum distance a player can damage an entity from; Type=double, +Leniency=Increase. + * Minimum distance a player can damage an entity from; Type=DOUBLE, Leniency=INCREASE. */ public double ENTITY_MAX_DISTANCE(); /** - * Minimum distance a player can damage an entity from in creative mode; Type=double, +Leniency=Increase. + * Minimum distance a player can damage an entity from in creative mode; Type=DOUBLE, Leniency=INCREASE. */ public double ENTITY_MAX_DISTANCE_CREATIVE(); /** - * Maximum speed a player on a ladder can travel; Type=double, +Leniency=Increase. + * Maximum speed a player on a ladder can travel; Type=DOUBLE, Leniency=INCREASE. */ public double LADDER_Y_MAX(); /** - * Minimum speed a player on a ladder can travel; Type=double, +Leniency=Decrease. + * Minimum speed a player on a ladder can travel; Type=DOUBLE, Leniency=DECREASE. */ public double LADDER_Y_MIN(); /** - * Maximum speed a player can travel up; Type=double, +Leniency=Increase. + * Maximum speed a player can travel up; Type=DOUBLE, Leniency=INCREASE. */ public double Y_SPEED_MAX(); /** - * Maximum difference between the player's last 2 Y values when traveling up; Type=double, +Leniency=Increase. + * Maximum difference between the player's last 2 Y values when traveling up; Type=DOUBLE, Leniency=INCREASE. */ public double Y_MAXDIFF(); /** - * Time in between Y difference measures; Type=system, +Leniency=Decrease. + * Time in between Y difference measures; Type=SYSTEM, Leniency=DECREASE. */ public int Y_TIME(); /** - * Maximum speed a player can travel forwards or backwards; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX(); /** - * Maximum speed a player can travel forwards or backwards while sprinting; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards while sprinting; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX_SPRINT(); /** - * Maximum speed a player can travel forwards or backwards while flying; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards while flying; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX_FLY(); /** - * Maximum speed a player can travel forwards or backwards while under the influence; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards while under the influence; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX_POTION(); /** - * Maximum speed a player can travel forwards or backwards while sprinting while under the influence; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards while sprinting while under the influence; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX_POTION_SPRINT(); /** - * Maximum speed a player can travel forwards or backwards while sneaking; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards while sneaking; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX_SNEAK(); /** - * Maximum speed a player can travel forwards or backwards in water; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards in water; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX_WATER(); /** - * Maximum speed a player can travel forwards or backwards in water while sprinting; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards in water while sprinting; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX_WATER_SPRINT(); /** - * Maximum speed a player can travel forwards or backwards on soul sand; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards on soul sand; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX_SOULSAND(); /** - * Maximum speed a player can travel forwards or backwards on soul sand while sprinting; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards on soul sand while sprinting; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX_SOULSAND_SPRINT(); /** - * Maximum speed a player can travel forwards or backwards on soul sand while under the influence; Type=double, +Leniency=Increase. + * Maximum speed a player can travel forwards or backwards on soul sand while under the influence; Type=DOUBLE, Leniency=INCREASE. */ public double XZ_SPEED_MAX_SOULSAND_POTION(); /** - * Maximum times a player can fail the speed check before action is taken; Type=integer, +Leniency=Increase. + * Maximum times a player can fail the speed check before action is taken; Type=INTEGER, Leniency=INCREASE. */ public int SPEED_MAX(); /** - * The number of clicks we should wait before checking if the player has used fast inventory; Type=integer; +Leniency=Increase. + * The number of clicks we should wait before checking if the player has used fast inventory; Type=INTEGER; Leniency=INCREASE. */ public int INVENTORY_CHECK(); /** - * The minimum time it should have taken for the player to click X times; Type=integer; +Leniency=Increase. + * The minimum time it should have taken for the player to click X times; Type=INTEGER; Leniency=INCREASE. */ public int INVENTORY_TIMEMIN(); /** - * The number of steps we should wait before checking if the player has used timer cheating; Type=integer; +Leniency=Increase. + * The number of steps we should wait before checking if the player has used timer cheating; Type=INTEGER; Leniency=INCREASE. */ public int TIMER_STEP_CHECK(); /** - * The minimum time it should have taken for the player to travel X steps; Type=system; +Leniency=Decrease. + * The minimum time it should have taken for the player to travel X steps; Type=SYSTEM; Leniency=DECREASE. */ public int TIMER_TIMEMIN(); /** - * Minimum travel distance for move to be considered a teleport and subsequently be ignored; Type=int; +Leniency=Increase. + * Minimum travel distance for move to be considered a teleport and subsequently be ignored; Type=INTEGER, Leniency=INCREASE. */ public int TELEPORT_MIN(); }