Test #723 essentials.ban.notify - only people with this permission get notified on ban

This commit is contained in:
ementalo 2011-07-22 12:36:49 +01:00
parent 54559172c6
commit ba2b827d7c

View File

@ -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));
}
}
}
}