Revert removing strict anticheat
This commit is contained in:
parent
cdc4f3debd
commit
ac63985419
@ -147,6 +147,7 @@ public class AntiHack extends MiniPlugin
|
||||
|
||||
// These are the GWEN checks to ignore when handling PlayerViolationEvent
|
||||
private HashSet<Class<? extends Check>> _ignoredChecks = new HashSet<>();
|
||||
private boolean _strict;
|
||||
|
||||
private AntiHack()
|
||||
{
|
||||
@ -468,4 +469,14 @@ public class AntiHack extends MiniPlugin
|
||||
ThreadLocalRandom.current().nextBytes(holder);
|
||||
return DatatypeConverter.printHexBinary(holder);
|
||||
}
|
||||
|
||||
public boolean isStrict()
|
||||
{
|
||||
return _strict;
|
||||
}
|
||||
|
||||
public void setStrict(boolean strict)
|
||||
{
|
||||
this._strict = strict;
|
||||
}
|
||||
}
|
||||
|
@ -270,6 +270,14 @@ public class PunishPage extends CraftInventoryCustom implements Listener
|
||||
|
||||
|
||||
int flightSeverity = 2;
|
||||
try
|
||||
{
|
||||
if (Managers.get(AntiHack.class).isStrict())
|
||||
{
|
||||
flightSeverity = 3;
|
||||
}
|
||||
}
|
||||
catch (Exception e) {}
|
||||
|
||||
AddButton(41, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3",new String[]
|
||||
{
|
||||
|
@ -1231,6 +1231,16 @@ public class GameFlagManager implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void AntiHackStrict(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare || event.GetState() == GameState.Live)
|
||||
Managers.get(AntiHack.class).setStrict(event.GetGame().StrictAntiHack);
|
||||
|
||||
else
|
||||
Managers.get(AntiHack.class).setStrict(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void PlayerKillCommandCancel(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user