diff options
author | EvilSeph <evilseph@gmail.com> | 2011-10-03 01:31:38 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2011-10-03 10:11:45 -0400 |
commit | e7dc19c375c436f380e9513e07e2ff618790e06a (patch) | |
tree | 849887fd2d603c55879e742c678adcffed2929d2 | |
parent | 35761eb83ed2590ba0884d77be5d6aae7bafd96f (diff) | |
download | bukkit-e7dc19c375c436f380e9513e07e2ff618790e06a.tar bukkit-e7dc19c375c436f380e9513e07e2ff618790e06a.tar.gz bukkit-e7dc19c375c436f380e9513e07e2ff618790e06a.tar.lz bukkit-e7dc19c375c436f380e9513e07e2ff618790e06a.tar.xz bukkit-e7dc19c375c436f380e9513e07e2ff618790e06a.zip |
Made the Ban command kick a matching player if they are online.
-rw-r--r-- | src/main/java/org/bukkit/command/defaults/BanCommand.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/command/defaults/BanCommand.java b/src/main/java/org/bukkit/command/defaults/BanCommand.java index d415835b..6e3d0ba1 100644 --- a/src/main/java/org/bukkit/command/defaults/BanCommand.java +++ b/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; |