diff --git a/src/main/java/net/gteam/wave/checks/CheckHolder.java b/src/main/java/net/gteam/wave/checks/CheckHolder.java index d5bd8cd..ce8cd30 100644 --- a/src/main/java/net/gteam/wave/checks/CheckHolder.java +++ b/src/main/java/net/gteam/wave/checks/CheckHolder.java @@ -3,7 +3,7 @@ import net.gteam.wave.checks.annotations.Disabled; import net.gteam.wave.checks.impl.fly.Fly10A; import net.gteam.wave.checks.impl.jump.Jump5A; -import net.gteam.wave.checks.impl.motion.Speed5A; +import net.gteam.wave.checks.impl.motion.Speed10A; import net.gteam.wave.checks.types.Check; import net.gteam.wave.managers.profile.Profile; import net.gteam.wave.processors.ClientPlayPacket; @@ -36,7 +36,7 @@ public void registerAll() { new Fly10A(this.profile), new Jump5A(this.profile), - new Speed5A(this.profile) + new Speed10A(this.profile) ); diff --git a/src/main/java/net/gteam/wave/checks/impl/fly/Fly10A.java b/src/main/java/net/gteam/wave/checks/impl/fly/Fly10A.java index 1344542..f2664a8 100644 --- a/src/main/java/net/gteam/wave/checks/impl/fly/Fly10A.java +++ b/src/main/java/net/gteam/wave/checks/impl/fly/Fly10A.java @@ -8,7 +8,6 @@ import net.gteam.wave.processors.ClientPlayPacket; import net.gteam.wave.processors.ServerPlayPacket; -@Development public class Fly10A extends Check { public Fly10A(final Profile profile) { diff --git a/src/main/java/net/gteam/wave/checks/impl/jump/Jump5A.java b/src/main/java/net/gteam/wave/checks/impl/jump/Jump5A.java index f4b3f54..650f22b 100644 --- a/src/main/java/net/gteam/wave/checks/impl/jump/Jump5A.java +++ b/src/main/java/net/gteam/wave/checks/impl/jump/Jump5A.java @@ -11,7 +11,6 @@ import net.gteam.wave.utils.custom.CustomEffect; import net.gteam.wave.utils.custom.EffectType; -@Development public class Jump5A extends Check { public Jump5A(final Profile profile) { diff --git a/src/main/java/net/gteam/wave/checks/impl/motion/Speed5A.java b/src/main/java/net/gteam/wave/checks/impl/motion/Speed10A.java similarity index 81% rename from src/main/java/net/gteam/wave/checks/impl/motion/Speed5A.java rename to src/main/java/net/gteam/wave/checks/impl/motion/Speed10A.java index b8b3b5e..9644ff2 100644 --- a/src/main/java/net/gteam/wave/checks/impl/motion/Speed5A.java +++ b/src/main/java/net/gteam/wave/checks/impl/motion/Speed10A.java @@ -7,10 +7,10 @@ import net.gteam.wave.processors.ClientPlayPacket; import net.gteam.wave.processors.ServerPlayPacket; -public class Speed5A extends Check { +public class Speed10A extends Check { - public Speed5A(final Profile profile) { - super(profile, CheckType.SPEED, "SP5A", "Impossible XZ speed"); + public Speed10A(final Profile profile) { + super(profile, CheckType.SPEED, "SP10A", "Impossible XZ speed"); } @Override diff --git a/src/main/java/net/gteam/wave/checks/types/AbstractCheck.java b/src/main/java/net/gteam/wave/checks/types/AbstractCheck.java index b6a63b6..767bf84 100644 --- a/src/main/java/net/gteam/wave/checks/types/AbstractCheck.java +++ b/src/main/java/net/gteam/wave/checks/types/AbstractCheck.java @@ -35,7 +35,7 @@ public abstract class AbstractCheck { private final boolean development, disabled, experimental; private final CheckCategory checkCategory; private final CheckType check; - private int vl; + private int vl = 1; private final int maxVl; private float buffer; private String verbose = ""; @@ -57,13 +57,13 @@ public AbstractCheck(final Profile profile, final CheckType check, final String this.enabled = type.isEmpty() ? config.getBoolean(codeName + ".enabled") - : config.getBoolean(codeName + "." + checkType + ".enabled", config.getBoolean(codeName + "." + checkType)); + : config.getBoolean(codeName + "." + checkType + ".enabled", config.getBoolean(codeName + "." + checkType + ".enabled")); - this.maxVl = config.getInt(codeName + ".max_vl"); + this.maxVl = config.getInt(codeName + "." + checkType + ".max_vl"); if (profile != null) { this.commands.addAll( - BetterStream.applyAndGet(config.getStringList(codeName + ".commands"), + BetterStream.applyAndGet(config.getStringList(codeName + "." + checkType + ".commands"), command -> command.replace("%player%", profile.getPlayer().getName()) ) ); diff --git a/src/main/java/net/gteam/wave/files/Checks.java b/src/main/java/net/gteam/wave/files/Checks.java index 8c8afa0..b492540 100644 --- a/src/main/java/net/gteam/wave/files/Checks.java +++ b/src/main/java/net/gteam/wave/files/Checks.java @@ -59,20 +59,24 @@ public void shutdown() { } public enum Setting { - FLY("fly", "", "Fly Check"), - FLY_FL10A("fly.fl10a", true, "Should we enable this module?"), - FLY_MAX_VL("fly.max_vl", 10, "The maximum violation amount a player needs to reach in order to get punished"), - FLY_COMMANDS("fly.commands", Collections.singletonList("kick %player% Unfair Advantage"), "The commands that will get executed once a player reaches the maximum violation amount"), - - JUMP("jump", "", "Jump Check"), - JUMP_JU5A("jump.ju5a", true, "Should we enable this module?"), - JUMP_MAX_VL("jump.max_vl", 5, "The maximum violation amount a player needs to reach in order to get punished"), - JUMP_COMMANDS("jump.commands", Collections.singletonList("kick %player% Unfair Advantage"), "The commands that will get executed once a player reaches the maximum violation amount"), - - SPEED("speed", "", "Speed Check"), - SPEED_SP10A("speed.sp10a", true, "Should we enable this module?"), - SPEED_MAX_VL("speed.max_vl", 10, "The maximum violation amount a player needs to reach in order to get punished"), - SPEED_COMMANDS("speed.commands", Collections.singletonList("kick %player% Unfair Advantage"), "The commands that will get executed once a player reaches the maximum violation amount"); + FLY("fly", "", "Fly Checks"), + FLY_FL10A("fly.fl10a", true, "Should we enable this check ?"), + FLY_FL10A_MAX_VL("fly.fl10a.max_vl", 10, "The maximum violation amount a player needs to reach in order to get punished"), + FLY_FL10A_COMMANDS("fly.fl10a.commands", Collections.singletonList("kick %player% Unfair Advantage"), "The commands that will get executed once a player reaches the maximum violation amount"), + + JUMP("jump", "", "Jump Checks"), + JUMP_JU5A("jump.ju5a", true, "Should we enable this check ?"), + JUMP_JU5A_MAX_VL("jump.ju5a.max_vl", 5, "The maximum violation amount a player needs to reach in order to get punished"), + JUMP_JU5A_COMMANDS("jump.ju5a.commands", Collections.singletonList("kick %player% Unfair Advantage"), "The commands that will get executed once a player reaches the maximum violation amount"), + + SPEED("speed", "", "Jump Checks"), + SPEED_SP10A("speed.sp10a", true, "Should we enable this check ?"), + SPEED_SP10A_MAX_VL("speed.sp10a.max_vl", 10, "The maximum violation amount a player needs to reach in order to get punished"), + SPEED_SP10A_COMMANDS("speed.sp10a.commands", Collections.singletonList("kick %player% Unfair Advantage"), "The commands that will get executed once a player reaches the maximum violation amount"), + + // Next check + + ; private final String key; private final Object defaultValue;