diff options
author | ementalo <suror@gmx.co.uk> | 2011-07-22 12:36:49 +0100 |
---|---|---|
committer | ementalo <suror@gmx.co.uk> | 2011-07-22 12:36:49 +0100 |
commit | ba2b827d7cab1c078a3078f78d32394e3e1f01ea (patch) | |
tree | 40aa986c19c96bf32e30367600f1dc48edcdd36a | |
parent | 54559172c628632e8e26a911949d1dd0370d3331 (diff) | |
download | Essentials-ba2b827d7cab1c078a3078f78d32394e3e1f01ea.tar Essentials-ba2b827d7cab1c078a3078f78d32394e3e1f01ea.tar.gz Essentials-ba2b827d7cab1c078a3078f78d32394e3e1f01ea.tar.lz Essentials-ba2b827d7cab1c078a3078f78d32394e3e1f01ea.tar.xz Essentials-ba2b827d7cab1c078a3078f78d32394e3e1f01ea.zip |
Test #723 essentials.ban.notify - only people with this permission get notified on ban
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandban.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandban.java b/Essentials/src/com/earth2me/essentials/commands/Commandban.java index 2bd09831d..45e6a2035 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandban.java @@ -53,6 +53,13 @@ public class Commandban extends EssentialsCommand } player.kickPlayer(banReason); ess.getBans().banByName(player.getName()); - server.broadcastMessage(Util.format("playerBanned", player.getName(), banReason)); + for(Player p : server.getOnlinePlayers()) + { + User u = ess.getUser(p); + if(u.isAuthorized("essentials.ban.notify")) + { + p.sendMessage(Util.format("playerBanned", player.getName(), banReason)); + } + } } } |