From 903b75184d5e89c956c4333d1852f02806d22922 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 3 Oct 2011 01:31:38 -0400 Subject: [PATCH] Made the Ban command kick a matching player if they are online. By: EvilSeph --- .../src/main/java/org/bukkit/command/defaults/BanCommand.java | 1 + 1 file changed, 1 insertion(+) diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/BanCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/BanCommand.java index d415835b42..6e3d0ba1aa 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/BanCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/BanCommand.java @@ -22,6 +22,7 @@ public class BanCommand extends VanillaCommand { } Bukkit.getOfflinePlayer(args[0]).setBanned(true); + if (Bukkit.getPlayer(args[0]) != null) Bukkit.getPlayer(args[0]).kickPlayer("Banned by admin."); Command.broadcastCommandMessage(sender, "Banning " + args[0]); return true;