diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java index 619bfea26..8d17a56c0 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java @@ -43,11 +43,14 @@ import org.bukkit.event.hanging.HangingPlaceEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.world.WorldLoadEvent; +import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scoreboard.NameTagVisibility; import org.bukkit.scoreboard.Scoreboard; import org.bukkit.scoreboard.Team; import org.bukkit.util.Vector; +import com.mineplex.anticheat.MineplexAnticheat; +import com.mineplex.anticheat.checks.move.Glide; import com.mojang.authlib.GameProfile; import mineplex.core.Managers; @@ -290,6 +293,7 @@ public abstract class Game extends ListenerComponent implements Lifetimed public boolean StrictAntiHack = false; public boolean AnticheatDisabled = false; + public boolean GlideCheckEnabled = true; public boolean DisableKillCommand = true; @@ -790,15 +794,19 @@ public abstract class Game extends ListenerComponent implements Lifetimed _gameState = state; _gameStateTime = System.currentTimeMillis(); - if (this._gameState == Game.GameState.Prepare) + if (_gameState == Game.GameState.Prepare) { // Speed Builders, Master Builders, Draw My Thing, Castle Siege - if (!this.AnticheatDisabled) + if (!AnticheatDisabled) { 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(); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragons/Dragons.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragons/Dragons.java index 4edb06d91..c373d1df4 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragons/Dragons.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragons/Dragons.java @@ -91,6 +91,7 @@ public class Dragons extends SoloGame .register(this); // Disable specific GWEN checks for this game + this.GlideCheckEnabled = false; AntiHack antiHack = Managers.get(AntiHack.class); antiHack.addIgnoredCheck(Speed.class); antiHack.addIgnoredCheck(Glide.class); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/Moba.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/Moba.java index 2476596e5..2e143e89f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/Moba.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/Moba.java @@ -179,6 +179,7 @@ public class Moba extends TeamGame .register(this); // Disable specific GWEN checks for this game + GlideCheckEnabled = false; AntiHack antiHack = Managers.get(AntiHack.class); antiHack.addIgnoredCheck(Speed.class); antiHack.addIgnoredCheck(Glide.class); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/runner/Runner.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/runner/Runner.java index 5d7072534..e6c375ee8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/runner/Runner.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/runner/Runner.java @@ -94,7 +94,8 @@ public class Runner extends SoloGame implements IThrown .setGiveCompassToSpecs(true) .setGiveCompassToAlive(false) .register(this); - + + this.GlideCheckEnabled = false; AntiHack antiHack = Managers.get(AntiHack.class); antiHack.addIgnoredCheck(Speed.class); antiHack.addIgnoredCheck(Glide.class); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/Skyfall.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/Skyfall.java index 988e8fed1..b3de60f58 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/Skyfall.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/Skyfall.java @@ -206,6 +206,7 @@ public abstract class Skyfall extends Game registerModule(new VersionModule(MinecraftVersion.Version1_9)); // Disable specific GWEN checks for this game + GlideCheckEnabled = false; AntiHack antiHack = Managers.get(AntiHack.class); antiHack.addIgnoredCheck(Speed.class); antiHack.addIgnoredCheck(Glide.class); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmash.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmash.java index 794c39706..f6075b9c1 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmash.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmash.java @@ -156,6 +156,7 @@ public abstract class SuperSmash extends Game ReplaceTeamsWithKits = true; AllowParticles = false; PlayerGameMode = GameMode.ADVENTURE; + GlideCheckEnabled = false; manager.GetExplosion().SetRegenerate(true); manager.GetExplosion().setRegenerateTime(TimeUnit.SECONDS.toMillis(30)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmashDominate.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmashDominate.java index 9c74d0c25..5d0632b72 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmashDominate.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmashDominate.java @@ -6,9 +6,9 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.block.BlockFadeEvent; import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.EntityRegainHealthEvent; -import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import org.bukkit.event.player.PlayerInteractEvent; @@ -20,9 +20,23 @@ import nautilus.game.arcade.ArcadeFormat; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.GameType; 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.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.managers.chat.ChatStatData; @@ -68,6 +82,8 @@ public class SuperSmashDominate extends Domination BlankLine, new ChatStatData("kit", "Kit", true) ); + + GlideCheckEnabled = false; } @EventHandler(priority = EventPriority.LOWEST) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java index 183682e58..2083518f4 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java @@ -25,6 +25,10 @@ import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.event.player.PlayerQuitEvent; 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.account.permissions.Permission; @@ -187,6 +191,7 @@ public class GameHostManager implements Listener // Disable all checks in event servers Stream.concat(AntiHack.ACTIONS.keySet().stream(), AntiHack.CHECKS.keySet().stream()).distinct().forEach(_antiHack::addIgnoredCheck); + JavaPlugin.getPlugin(MineplexAnticheat.class).getCheckManager().disableCheck(Glide.class); } @EventHandler