Make extreme prejudice a bit more sneaky

This commit is contained in:
AlexTheCoder 2017-02-25 22:02:46 -05:00 committed by cnr
parent b78ce421b5
commit 9fdcce525b
5 changed files with 33 additions and 49 deletions

View File

@ -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<String> _detailedMessages = new HashSet<>();
private final GEPBanAction _gepAction = new GEPBanAction(10);
private Set<Player> _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);

View File

@ -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
{

View File

@ -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

View File

@ -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);
}
}
}

View File

@ -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);