diff --git a/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHack.java b/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHack.java index c328ba557..132e94272 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHack.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHack.java @@ -51,7 +51,6 @@ import mineplex.core.account.CoreClient; import mineplex.core.account.CoreClientManager; import mineplex.core.antihack.actions.AntiHackAction; import mineplex.core.antihack.actions.BanwaveAction; -import mineplex.core.antihack.actions.GEPBanAction; import mineplex.core.antihack.actions.ImmediateBanAction; import mineplex.core.antihack.actions.NoopAction; import mineplex.core.antihack.animations.BanwaveAnimationSpin; @@ -130,8 +129,6 @@ public class AntiHack extends MiniPlugin private final Punish _punish = require(Punish.class); private final Set _detailedMessages = new HashSet<>(); - - private final GEPBanAction _gepAction = new GEPBanAction(10); private Set _pendingBan = Collections.synchronizedSet(new HashSet<>()); @@ -364,11 +361,6 @@ public class AntiHack extends MiniPlugin { if (_ignoredChecks.contains(event.getCheckClass())) return; - - if (_gepAction.handleCustom(event)) - { - return; - } ACTIONS.getOrDefault(event.getCheckClass(), NOOP_ACTION).handle(event); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/AntiHackAction.java b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/AntiHackAction.java index c919bba58..f3b748352 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/AntiHackAction.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/AntiHackAction.java @@ -1,18 +1,6 @@ package mineplex.core.antihack.actions; import com.mineplex.anticheat.api.PlayerViolationEvent; -import com.mineplex.anticheat.checks.combat.KillauraTypeA; -import com.mineplex.anticheat.checks.combat.KillauraTypeD; -import com.mineplex.anticheat.checks.move.Glide; -import com.mineplex.anticheat.checks.move.HeadRoll; -import com.mineplex.anticheat.checks.move.Speed; -import mineplex.core.common.util.UtilServer; -import org.bukkit.event.Listener; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; public abstract class AntiHackAction { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/BanwaveAction.java b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/BanwaveAction.java index 24408afe9..694c75488 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/BanwaveAction.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/BanwaveAction.java @@ -3,6 +3,7 @@ package mineplex.core.antihack.actions; import com.mineplex.anticheat.api.PlayerViolationEvent; import mineplex.core.Managers; +import mineplex.core.antihack.AntiHack; import mineplex.core.antihack.banwave.BanWaveManager; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilServer; @@ -20,6 +21,11 @@ public class BanwaveAction extends AntiHackAction @Override public void handle(PlayerViolationEvent event) { + if (event.getViolations() >= (Math.floor(getMinVl() * .9)) && event.getPlayer().getMetadata("GWENEXTREMEPREJUDICE").get(0).asBoolean()) + { + Managers.get(AntiHack.class).doBan(event.getPlayer(), event.getCheckClass(), true); + return; + } if (event.getViolations() >= this.getMinVl()) { // Delay bans by 6 hours +/- 2 hours for fuzzing diff --git a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/GEPBanAction.java b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/GEPBanAction.java index 00088d7de..0fbaa3377 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/GEPBanAction.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/GEPBanAction.java @@ -1,30 +1,23 @@ -package mineplex.core.antihack.actions; - -import com.mineplex.anticheat.api.PlayerViolationEvent; - -import mineplex.core.Managers; -import mineplex.core.antihack.AntiHack; - -public class GEPBanAction extends AntiHackAction -{ - public GEPBanAction(int vl) - { - super(vl); - } - - public boolean handleCustom(PlayerViolationEvent event) - { - if (event.getViolations() >= this.getMinVl() && event.getPlayer().getMetadata("GWENEXTREMEPREJUDICE").get(0).asBoolean()) - { - Managers.get(AntiHack.class).doBan(event.getPlayer(), event.getCheckClass(), true); - return true; - } - return false; - } - - @Override - public void handle(PlayerViolationEvent event) - { - - } +package mineplex.core.antihack.actions; + +import com.mineplex.anticheat.api.PlayerViolationEvent; + +import mineplex.core.Managers; +import mineplex.core.antihack.AntiHack; + +public class GEPBanAction extends AntiHackAction +{ + public GEPBanAction(int vl) + { + super(vl); + } + + @Override + public void handle(PlayerViolationEvent event) + { + if (event.getViolations() >= this.getMinVl() && event.getPlayer().getMetadata("GWENEXTREMEPREJUDICE").get(0).asBoolean()) + { + Managers.get(AntiHack.class).doBan(event.getPlayer(), event.getCheckClass(), true); + } + } } \ No newline at end of file diff --git a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/ImmediateBanAction.java b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/ImmediateBanAction.java index 1e096fbe5..1016ba9c5 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/ImmediateBanAction.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/ImmediateBanAction.java @@ -15,6 +15,11 @@ public class ImmediateBanAction extends AntiHackAction @Override public void handle(PlayerViolationEvent event) { + if (event.getViolations() >= (Math.floor(getMinVl() * .9)) && event.getPlayer().getMetadata("GWENEXTREMEPREJUDICE").get(0).asBoolean()) + { + Managers.get(AntiHack.class).doBan(event.getPlayer(), event.getCheckClass(), true); + return; + } if (event.getViolations() >= this.getMinVl()) { Managers.get(AntiHack.class).doBan(event.getPlayer(), event.getCheckClass(), false);