mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-15 11:04:29 +02:00
Test #723 essentials.ban.notify - only people with this permission get notified on ban
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user