Made the Ban command kick a matching player if they are online.
This commit is contained in:
parent
35761eb83e
commit
e7dc19c375
@ -22,6 +22,7 @@ public class BanCommand extends VanillaCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Bukkit.getOfflinePlayer(args[0]).setBanned(true);
|
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]);
|
Command.broadcastCommandMessage(sender, "Banning " + args[0]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user