Implement a message when GWEN kicks a player and bump to latest anticheat version
This commit is contained in:
parent
e9c2346814
commit
5872aec38c
@ -48,7 +48,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mineplex</groupId>
|
<groupId>com.mineplex</groupId>
|
||||||
<artifactId>anticheat</artifactId>
|
<artifactId>anticheat</artifactId>
|
||||||
<version>1.11.1</version>
|
<version>1.11.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.tukaani</groupId>
|
<groupId>org.tukaani</groupId>
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
package mineplex.core.antihack.actions;
|
package mineplex.core.antihack.actions;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
import com.mineplex.anticheat.api.PlayerViolationEvent;
|
import com.mineplex.anticheat.api.PlayerViolationEvent;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.F;
|
||||||
|
|
||||||
public class ImmediateKickAction extends AntiHackAction
|
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)
|
public ImmediateKickAction(int vl)
|
||||||
{
|
{
|
||||||
super(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())
|
if (event.getViolations() >= (Math.floor(getMinVl() * .9)) && event.getPlayer().getMetadata("GWENEXTREMEPREJUDICE").get(0).asBoolean())
|
||||||
{
|
{
|
||||||
event.getPlayer().kickPlayer(message);
|
event.getPlayer().kickPlayer(message);
|
||||||
|
Bukkit.getServer().broadcastMessage(String.format(USER_HAS_BEEN_KICKED, event.getPlayer().getName()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (event.getViolations() >= this.getMinVl())
|
if (event.getViolations() >= this.getMinVl())
|
||||||
{
|
{
|
||||||
event.getPlayer().kickPlayer(message);
|
event.getPlayer().kickPlayer(message);
|
||||||
|
Bukkit.getServer().broadcastMessage(String.format(USER_HAS_BEEN_KICKED, event.getPlayer().getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user