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 1deaf4a35..f58f843a9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/BanwaveAction.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/BanwaveAction.java @@ -12,7 +12,6 @@ import mineplex.core.common.util.UtilServer; public class BanwaveAction extends AntiHackAction { - private final AntiHack _antiHack = Managers.require(AntiHack.class); private static final int BAN_DELAY_MINIMUM_MINUTES = 30; private static final int BAN_DELAY_MAXIMUM_MINUTES = (int) TimeUnit.MINUTES.convert(2, TimeUnit.HOURS); @@ -24,6 +23,8 @@ public class BanwaveAction extends AntiHackAction @Override public void handle(PlayerViolationEvent event) { + AntiHack _antiHack = Managers.get(AntiHack.class); + if (event.getViolations() >= (Math.floor(getMinVl() * .9)) && event.getPlayer().getMetadata("GWENEXTREMEPREJUDICE").get(0).asBoolean()) { _antiHack.doBan(event.getPlayer(), event.getCheckClass(), true, _antiHack.getHoursBanned(event.getPlayer())); 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 6c109e68c..4f09f49f0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/GEPBanAction.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/GEPBanAction.java @@ -7,8 +7,6 @@ import mineplex.core.antihack.AntiHack; public class GEPBanAction extends AntiHackAction { - private final AntiHack _antiHack = Managers.require(AntiHack.class); - public GEPBanAction(int vl) { super(vl); @@ -17,6 +15,8 @@ public class GEPBanAction extends AntiHackAction @Override public void handle(PlayerViolationEvent event) { + AntiHack _antiHack = Managers.get(AntiHack.class); + if (event.getViolations() >= this.getMinVl() && event.getPlayer().getMetadata("GWENEXTREMEPREJUDICE").get(0).asBoolean()) { _antiHack.doBan(event.getPlayer(), event.getCheckClass(), true, _antiHack.getHoursBanned(event.getPlayer())); 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 2f86d524d..6062d9629 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/ImmediateBanAction.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/ImmediateBanAction.java @@ -7,8 +7,6 @@ import mineplex.core.antihack.AntiHack; public class ImmediateBanAction extends AntiHackAction { - private final AntiHack _antiHack = Managers.require(AntiHack.class); - public ImmediateBanAction(int vl) { super(vl); @@ -17,6 +15,8 @@ public class ImmediateBanAction extends AntiHackAction @Override public void handle(PlayerViolationEvent event) { + AntiHack _antiHack = Managers.get(AntiHack.class); + if (event.getViolations() >= (Math.floor(getMinVl() * .9)) && event.getPlayer().getMetadata("GWENEXTREMEPREJUDICE").get(0).asBoolean()) { _antiHack.doBan(event.getPlayer(), event.getCheckClass(), true, _antiHack.getHoursBanned(event.getPlayer()));