diff --git a/Plugins/Mineplex.Core/src/mineplex/core/punish/Punish.java b/Plugins/Mineplex.Core/src/mineplex/core/punish/Punish.java index 43795b9d6..02c380451 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/punish/Punish.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/punish/Punish.java @@ -169,12 +169,14 @@ public class Punish extends MiniPlugin { public void run() { - String kickReason = C.cRed + C.Bold + "You were banned for " + durationString + " by " + caller == null ? "Mineplex Anti-Cheat" : caller.getName() + + String kickReason = C.cRed + C.Bold + "You were banned for " + durationString + " by " + (caller == null ? "Mineplex Anti-Cheat" : caller.getName()) + "\n" + C.cWhite + reason + "\n" + C.cDGreen + "Unfairly banned? Appeal at " + C.cGreen + "www.mineplex.com/appeals" ; - UtilPlayer.kick(UtilPlayer.searchOnline(null, playerName, false), GetName(), kickReason); + Player target = UtilPlayer.searchOnline(null, playerName, false); + if (target != null) + target.kickPlayer(kickReason); } });