Update disabled checks to match anticheat updates
This commit is contained in:
parent
79b6839736
commit
34428f7b5f
@ -43,11 +43,14 @@ import org.bukkit.event.hanging.HangingPlaceEvent;
|
|||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.event.world.WorldLoadEvent;
|
import org.bukkit.event.world.WorldLoadEvent;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.scoreboard.NameTagVisibility;
|
import org.bukkit.scoreboard.NameTagVisibility;
|
||||||
import org.bukkit.scoreboard.Scoreboard;
|
import org.bukkit.scoreboard.Scoreboard;
|
||||||
import org.bukkit.scoreboard.Team;
|
import org.bukkit.scoreboard.Team;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import com.mineplex.anticheat.MineplexAnticheat;
|
||||||
|
import com.mineplex.anticheat.checks.move.Glide;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
|
||||||
import mineplex.core.Managers;
|
import mineplex.core.Managers;
|
||||||
@ -290,6 +293,7 @@ public abstract class Game extends ListenerComponent implements Lifetimed
|
|||||||
|
|
||||||
public boolean StrictAntiHack = false;
|
public boolean StrictAntiHack = false;
|
||||||
public boolean AnticheatDisabled = false;
|
public boolean AnticheatDisabled = false;
|
||||||
|
public boolean GlideCheckEnabled = true;
|
||||||
|
|
||||||
public boolean DisableKillCommand = true;
|
public boolean DisableKillCommand = true;
|
||||||
|
|
||||||
@ -790,15 +794,19 @@ public abstract class Game extends ListenerComponent implements Lifetimed
|
|||||||
_gameState = state;
|
_gameState = state;
|
||||||
_gameStateTime = System.currentTimeMillis();
|
_gameStateTime = System.currentTimeMillis();
|
||||||
|
|
||||||
if (this._gameState == Game.GameState.Prepare)
|
if (_gameState == Game.GameState.Prepare)
|
||||||
{
|
{
|
||||||
// Speed Builders, Master Builders, Draw My Thing, Castle Siege
|
// Speed Builders, Master Builders, Draw My Thing, Castle Siege
|
||||||
if (!this.AnticheatDisabled)
|
if (!AnticheatDisabled)
|
||||||
{
|
{
|
||||||
Managers.get(AntiHack.class).enableAnticheat();
|
Managers.get(AntiHack.class).enableAnticheat();
|
||||||
|
if (!GlideCheckEnabled)
|
||||||
|
{
|
||||||
|
JavaPlugin.getPlugin(MineplexAnticheat.class).getCheckManager().disableCheck(Glide.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this._gameState == Game.GameState.End && !this.AnticheatDisabled)
|
}
|
||||||
|
else if (_gameState == Game.GameState.End && !this.AnticheatDisabled)
|
||||||
{
|
{
|
||||||
Managers.get(AntiHack.class).disableAnticheat();
|
Managers.get(AntiHack.class).disableAnticheat();
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,7 @@ public class Dragons extends SoloGame
|
|||||||
.register(this);
|
.register(this);
|
||||||
|
|
||||||
// Disable specific GWEN checks for this game
|
// Disable specific GWEN checks for this game
|
||||||
|
this.GlideCheckEnabled = false;
|
||||||
AntiHack antiHack = Managers.get(AntiHack.class);
|
AntiHack antiHack = Managers.get(AntiHack.class);
|
||||||
antiHack.addIgnoredCheck(Speed.class);
|
antiHack.addIgnoredCheck(Speed.class);
|
||||||
antiHack.addIgnoredCheck(Glide.class);
|
antiHack.addIgnoredCheck(Glide.class);
|
||||||
|
@ -179,6 +179,7 @@ public class Moba extends TeamGame
|
|||||||
.register(this);
|
.register(this);
|
||||||
|
|
||||||
// Disable specific GWEN checks for this game
|
// Disable specific GWEN checks for this game
|
||||||
|
GlideCheckEnabled = false;
|
||||||
AntiHack antiHack = Managers.get(AntiHack.class);
|
AntiHack antiHack = Managers.get(AntiHack.class);
|
||||||
antiHack.addIgnoredCheck(Speed.class);
|
antiHack.addIgnoredCheck(Speed.class);
|
||||||
antiHack.addIgnoredCheck(Glide.class);
|
antiHack.addIgnoredCheck(Glide.class);
|
||||||
|
@ -95,6 +95,7 @@ public class Runner extends SoloGame implements IThrown
|
|||||||
.setGiveCompassToAlive(false)
|
.setGiveCompassToAlive(false)
|
||||||
.register(this);
|
.register(this);
|
||||||
|
|
||||||
|
this.GlideCheckEnabled = false;
|
||||||
AntiHack antiHack = Managers.get(AntiHack.class);
|
AntiHack antiHack = Managers.get(AntiHack.class);
|
||||||
antiHack.addIgnoredCheck(Speed.class);
|
antiHack.addIgnoredCheck(Speed.class);
|
||||||
antiHack.addIgnoredCheck(Glide.class);
|
antiHack.addIgnoredCheck(Glide.class);
|
||||||
|
@ -206,6 +206,7 @@ public abstract class Skyfall extends Game
|
|||||||
registerModule(new VersionModule(MinecraftVersion.Version1_9));
|
registerModule(new VersionModule(MinecraftVersion.Version1_9));
|
||||||
|
|
||||||
// Disable specific GWEN checks for this game
|
// Disable specific GWEN checks for this game
|
||||||
|
GlideCheckEnabled = false;
|
||||||
AntiHack antiHack = Managers.get(AntiHack.class);
|
AntiHack antiHack = Managers.get(AntiHack.class);
|
||||||
antiHack.addIgnoredCheck(Speed.class);
|
antiHack.addIgnoredCheck(Speed.class);
|
||||||
antiHack.addIgnoredCheck(Glide.class);
|
antiHack.addIgnoredCheck(Glide.class);
|
||||||
|
@ -156,6 +156,7 @@ public abstract class SuperSmash extends Game
|
|||||||
ReplaceTeamsWithKits = true;
|
ReplaceTeamsWithKits = true;
|
||||||
AllowParticles = false;
|
AllowParticles = false;
|
||||||
PlayerGameMode = GameMode.ADVENTURE;
|
PlayerGameMode = GameMode.ADVENTURE;
|
||||||
|
GlideCheckEnabled = false;
|
||||||
|
|
||||||
manager.GetExplosion().SetRegenerate(true);
|
manager.GetExplosion().SetRegenerate(true);
|
||||||
manager.GetExplosion().setRegenerateTime(TimeUnit.SECONDS.toMillis(30));
|
manager.GetExplosion().setRegenerateTime(TimeUnit.SECONDS.toMillis(30));
|
||||||
|
@ -6,9 +6,9 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.block.BlockFadeEvent;
|
import org.bukkit.event.block.BlockFadeEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
import org.bukkit.event.entity.EntityRegainHealthEvent;
|
import org.bukkit.event.entity.EntityRegainHealthEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
|
||||||
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
|
|
||||||
@ -20,9 +20,23 @@ import nautilus.game.arcade.ArcadeFormat;
|
|||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.GameType;
|
import nautilus.game.arcade.GameType;
|
||||||
import nautilus.game.arcade.game.GameTeam;
|
import nautilus.game.arcade.game.GameTeam;
|
||||||
import nautilus.game.arcade.game.Game.GameState;
|
|
||||||
import nautilus.game.arcade.game.games.common.Domination;
|
import nautilus.game.arcade.game.games.common.Domination;
|
||||||
import nautilus.game.arcade.game.games.smash.kits.*;
|
import nautilus.game.arcade.game.games.smash.kits.KitBlaze;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitChicken;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitCreeper;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitEnderman;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitGolem;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitMagmaCube;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitPig;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitSkeletalHorse;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitSkeleton;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitSkySquid;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitSlime;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitSnowman;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitSpider;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitWitch;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitWitherSkeleton;
|
||||||
|
import nautilus.game.arcade.game.games.smash.kits.KitWolf;
|
||||||
import nautilus.game.arcade.kit.Kit;
|
import nautilus.game.arcade.kit.Kit;
|
||||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||||
|
|
||||||
@ -68,6 +82,8 @@ public class SuperSmashDominate extends Domination
|
|||||||
BlankLine,
|
BlankLine,
|
||||||
new ChatStatData("kit", "Kit", true)
|
new ChatStatData("kit", "Kit", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
GlideCheckEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
|
@ -25,6 +25,10 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
|||||||
import org.bukkit.event.player.PlayerLoginEvent;
|
import org.bukkit.event.player.PlayerLoginEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import com.mineplex.anticheat.MineplexAnticheat;
|
||||||
|
import com.mineplex.anticheat.checks.move.Glide;
|
||||||
|
|
||||||
import mineplex.core.Managers;
|
import mineplex.core.Managers;
|
||||||
import mineplex.core.account.permissions.Permission;
|
import mineplex.core.account.permissions.Permission;
|
||||||
@ -187,6 +191,7 @@ public class GameHostManager implements Listener
|
|||||||
|
|
||||||
// Disable all checks in event servers
|
// Disable all checks in event servers
|
||||||
Stream.concat(AntiHack.ACTIONS.keySet().stream(), AntiHack.CHECKS.keySet().stream()).distinct().forEach(_antiHack::addIgnoredCheck);
|
Stream.concat(AntiHack.ACTIONS.keySet().stream(), AntiHack.CHECKS.keySet().stream()).distinct().forEach(_antiHack::addIgnoredCheck);
|
||||||
|
JavaPlugin.getPlugin(MineplexAnticheat.class).getCheckManager().disableCheck(Glide.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
Loading…
Reference in New Issue
Block a user