mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Add much more configuration ability to spam module. Fixes #247
This commit is contained in:
1 parent
e474be703e
commit
bd2fd0952f
14 files changed
+214
-90
No files matched your search
@@ -29,24 +29,31 @@ public class Config extends ConfigurationFile {
|
||||
public static final String FILENAME = "config.yml";
|
||||
|
||||
public ConfigValue<Boolean> logToConsole;
|
||||
public ConfigValue<Boolean> logXRayStats;
|
||||
public ConfigValue<Boolean> autoUpdate;
|
||||
public ConfigValue<Boolean> verboseStartup;
|
||||
public ConfigValue<Boolean> alertWhenXRayIsFound;
|
||||
public ConfigValue<Boolean> silentMode;
|
||||
public ConfigValue<Boolean> exemptOp;
|
||||
public ConfigValue<Boolean> trackCreativeXRay;
|
||||
|
||||
public ConfigValue<Boolean> checkXRay;
|
||||
public ConfigValue<Boolean> checkCreativeXRay;
|
||||
public ConfigValue<Boolean> alertXRay;
|
||||
public ConfigValue<Integer> alertXRayInterval;
|
||||
|
||||
public ConfigValue<Boolean> eventChains;
|
||||
public ConfigValue<Boolean> enterprise;
|
||||
public ConfigValue<Boolean> blockChatSpam;
|
||||
public ConfigValue<Boolean> blockCommandSpam;
|
||||
|
||||
public ConfigValue<Boolean> blockChatSpamSpeed;
|
||||
public ConfigValue<Boolean> blockCommandSpamSpeed;
|
||||
public ConfigValue<Boolean> blockChatSpamRepetition;
|
||||
public ConfigValue<Boolean> blockCommandSpamRepetition;
|
||||
public ConfigValue<String> chatSpamActionOne;
|
||||
public ConfigValue<String> chatSpamActionTwo;
|
||||
public ConfigValue<String> commandSpamActionOne;
|
||||
public ConfigValue<String> commandSpamActionTwo;
|
||||
|
||||
public ConfigValue<Integer> fileLogLevel;
|
||||
|
||||
public ConfigValue<String> spamKickAction;
|
||||
public ConfigValue<String> spamBanAction;
|
||||
|
||||
public ConfigValue<List<String>> exemptedWorlds;
|
||||
public ConfigValue<List<String>> disabledWorlds;
|
||||
|
||||
public Config(AntiCheat plugin, Configuration config) {
|
||||
super(plugin, config, FILENAME);
|
||||
@@ -55,23 +62,31 @@ public class Config extends ConfigurationFile {
|
||||
@Override
|
||||
public void open() {
|
||||
logToConsole = new ConfigValue<Boolean>("system.log-to-console");
|
||||
logXRayStats = new ConfigValue<Boolean>("xray.check-xray");
|
||||
alertWhenXRayIsFound = new ConfigValue<Boolean>("xray.alert");
|
||||
|
||||
checkXRay = new ConfigValue<Boolean>("xray.check-xray");
|
||||
alertXRay = new ConfigValue<Boolean>("xray.alert");
|
||||
alertXRayInterval = new ConfigValue<Integer>("xray.alert-interval");
|
||||
checkCreativeXRay = new ConfigValue<Boolean>("xray.check-creative");
|
||||
|
||||
autoUpdate = new ConfigValue<Boolean>("system.auto-update");
|
||||
verboseStartup = new ConfigValue<Boolean>("system.verbose-startup");
|
||||
silentMode = new ConfigValue<Boolean>("system.silent-mode");
|
||||
exemptOp = new ConfigValue<Boolean>("system.exempt-op");
|
||||
trackCreativeXRay = new ConfigValue<Boolean>("xray.check-creative");
|
||||
eventChains = new ConfigValue<Boolean>("system.event-chains");
|
||||
enterprise = new ConfigValue<Boolean>("system.enterprise");
|
||||
blockChatSpam = new ConfigValue<Boolean>("spam.chat");
|
||||
blockCommandSpam = new ConfigValue<Boolean>("spam.command");
|
||||
|
||||
blockChatSpamSpeed = new ConfigValue<Boolean>("spam.chat.block-speed");
|
||||
blockChatSpamRepetition = new ConfigValue<Boolean>("spam.chat.block-repetition");
|
||||
chatSpamActionOne = new ConfigValue<String>("spam.chat.action-one");
|
||||
chatSpamActionTwo = new ConfigValue<String>("spam.chat.action-two");
|
||||
|
||||
blockCommandSpamSpeed = new ConfigValue<Boolean>("spam.command.block-speed");
|
||||
blockCommandSpamRepetition = new ConfigValue<Boolean>("spam.command.block-repetition");
|
||||
commandSpamActionOne = new ConfigValue<String>("spam.command.action-one");
|
||||
commandSpamActionTwo = new ConfigValue<String>("spam.command.action-two");
|
||||
|
||||
fileLogLevel = new ConfigValue<Integer>("system.file-log-level");
|
||||
|
||||
spamKickAction = new ConfigValue<String>("spam.action-one");
|
||||
spamBanAction = new ConfigValue<String>("spam.action-two");
|
||||
|
||||
exemptedWorlds = new ConfigValue<List<String>>("disable-in");
|
||||
disabledWorlds = new ConfigValue<List<String>>("disable-in");
|
||||
}
|
||||
}
|
||||
@@ -148,17 +148,21 @@ public class Magic extends ConfigurationFile {
|
||||
*/
|
||||
public int BLOCK_PUNCH_MIN;
|
||||
/**
|
||||
* Number of chat spam violations before a player is warned; Type=integer, +Leniency=Increase.
|
||||
* Number of command spam violations before action one is executed; Type=integer, +Leniency=Increase.
|
||||
*/
|
||||
public int CHAT_WARN_LEVEL;
|
||||
public int COMMAND_ACTION_ONE_LEVEL;
|
||||
/**
|
||||
* Number of chat spam violations before a player is kicked; Type=integer, +Leniency=Increase.
|
||||
* Number of command spam violations before action two is executed; Type=integer, +Leniency=Increase.
|
||||
*/
|
||||
public int CHAT_KICK_LEVEL;
|
||||
public int COMMAND_ACTION_TWO_LEVEL;
|
||||
/**
|
||||
* Number of kicks for chat violation before a player is banned; Type=integer, +Leniency=Increase.
|
||||
* Number of chat spam violations before action one is executed; Type=integer, +Leniency=Increase.
|
||||
*/
|
||||
public int CHAT_BAN_LEVEL;
|
||||
public int CHAT_ACTION_ONE_LEVEL;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@@ -223,12 +227,20 @@ public class Magic extends ConfigurationFile {
|
||||
* Minimum time between animations; Type=system, +Leniency=Increase.
|
||||
*/
|
||||
public int ANIMATION_MIN;
|
||||
/**
|
||||
* Minimum time between commands; Type=system, +Leniency=Increase.
|
||||
*/
|
||||
public int COMMAND_MIN;
|
||||
/**
|
||||
* MTime before repeating a command is ignored; Type=system, +Leniency=Increase.
|
||||
*/
|
||||
public int COMMAND_REPEAT_MIN;
|
||||
/**
|
||||
* Minimum time between chats; Type=system, +Leniency=Increase.
|
||||
*/
|
||||
public int CHAT_MIN;
|
||||
/**
|
||||
* Minimum time between repeating yourself in the chat; Type=system, +Leniency=Increase.
|
||||
* Time before repeating yourself in chat is ignored; Type=system, +Leniency=Increase.
|
||||
*/
|
||||
public int CHAT_REPEAT_MIN;
|
||||
/**
|
||||
@@ -400,9 +412,10 @@ public class Magic extends ConfigurationFile {
|
||||
FASTPLACE_MAXVIOLATIONS_CREATIVE = new ConfigValue<Integer>("FASTPLACE_MAXVIOLATIONS_CREATIVE").getValue();
|
||||
FASTPLACE_MAXVIOLATIONTIME = new ConfigValue<Integer>("FASTPLACE_MAXVIOLATIONTIME").getValue();
|
||||
BLOCK_PUNCH_MIN = new ConfigValue<Integer>("BLOCK_PUNCH_MIN").getValue();
|
||||
CHAT_WARN_LEVEL = new ConfigValue<Integer>("CHAT_WARN_LEVEL").getValue();
|
||||
CHAT_KICK_LEVEL = new ConfigValue<Integer>("CHAT_KICK_LEVEL").getValue();
|
||||
CHAT_BAN_LEVEL = new ConfigValue<Integer>("CHAT_BAN_LEVEL").getValue();
|
||||
CHAT_ACTION_ONE_LEVEL = new ConfigValue<Integer>("CHAT_ACTION_ONE_LEVEL").getValue();
|
||||
CHAT_ACTION_TWO_LEVEL = new ConfigValue<Integer>("CHAT_ACTION_TWO_LEVEL").getValue();
|
||||
COMMAND_ACTION_ONE_LEVEL = new ConfigValue<Integer>("COMMAND_ACTION_ONE_LEVEL").getValue();
|
||||
COMMAND_ACTION_TWO_LEVEL = new ConfigValue<Integer>("COMMAND_ACTION_TWO_LEVEL").getValue();
|
||||
FLIGHT_LIMIT = new ConfigValue<Integer>("FLIGHT_LIMIT").getValue();
|
||||
FLIGHT_BLOCK_LIMIT = new ConfigValue<Double>("FLIGHT_BLOCK_LIMIT").getValue();
|
||||
WATER_CLIMB_MAX = new ConfigValue<Double>("WATER_CLIMB_MAX").getValue();
|
||||
@@ -419,6 +432,8 @@ public class Magic extends ConfigurationFile {
|
||||
WATER_SPEED_VIOLATION_MAX = new ConfigValue<Integer>("WATER_SPEED_VIOLATION_MAX").getValue();
|
||||
SPRINT_FOOD_MIN = new ConfigValue<Integer>("SPRINT_FOOD_MIN").getValue();
|
||||
ANIMATION_MIN = new ConfigValue<Integer>("ANIMATION_MIN").getValue();
|
||||
COMMAND_MIN = new ConfigValue<Integer>("COMMAND_MIN").getValue();
|
||||
COMMAND_REPEAT_MIN = new ConfigValue<Integer>("COMMAND_REPEAT_MIN").getValue();
|
||||
CHAT_MIN = new ConfigValue<Integer>("CHAT_MIN").getValue();
|
||||
CHAT_REPEAT_MIN = new ConfigValue<Integer>("CHAT_REPEAT_MIN").getValue();
|
||||
SPRINT_MIN = new ConfigValue<Double>("SPRINT_MIN").getValue();
|
||||
|
||||
Reference in new issue
Block a user