From 5872aec38c612681b361e4043c992a0c51b796e4 Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Fri, 30 Mar 2018 06:37:51 -0400 Subject: [PATCH] Implement a message when GWEN kicks a player and bump to latest anticheat version --- Plugins/Mineplex.Core/pom.xml | 2 +- .../core/antihack/actions/ImmediateKickAction.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/pom.xml b/Plugins/Mineplex.Core/pom.xml index 9b215a001..3735bd449 100644 --- a/Plugins/Mineplex.Core/pom.xml +++ b/Plugins/Mineplex.Core/pom.xml @@ -48,7 +48,7 @@ com.mineplex anticheat - 1.11.1 + 1.11.2 org.tukaani diff --git a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/ImmediateKickAction.java b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/ImmediateKickAction.java index 0310fc94e..530b888b4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/ImmediateKickAction.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/actions/ImmediateKickAction.java @@ -1,11 +1,16 @@ package mineplex.core.antihack.actions; +import org.bukkit.Bukkit; + import com.mineplex.anticheat.api.PlayerViolationEvent; import mineplex.core.common.util.C; +import mineplex.core.common.util.F; public class ImmediateKickAction extends AntiHackAction { + private static final String USER_HAS_BEEN_KICKED = F.main("GWEN", "%s was removed from the game due to suspicious activity. I am always watching."); + public ImmediateKickAction(int vl) { super(vl); @@ -19,11 +24,13 @@ public class ImmediateKickAction extends AntiHackAction if (event.getViolations() >= (Math.floor(getMinVl() * .9)) && event.getPlayer().getMetadata("GWENEXTREMEPREJUDICE").get(0).asBoolean()) { event.getPlayer().kickPlayer(message); + Bukkit.getServer().broadcastMessage(String.format(USER_HAS_BEEN_KICKED, event.getPlayer().getName())); return; } if (event.getViolations() >= this.getMinVl()) { event.getPlayer().kickPlayer(message); + Bukkit.getServer().broadcastMessage(String.format(USER_HAS_BEEN_KICKED, event.getPlayer().getName())); } } }