mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 11:07:55 +01:00
Test #723 essentials.ban.notify - only people with this permission get notified on ban
This commit is contained in:
parent
54559172c6
commit
ba2b827d7c
@ -53,6 +53,13 @@ public class Commandban extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
player.kickPlayer(banReason);
|
player.kickPlayer(banReason);
|
||||||
ess.getBans().banByName(player.getName());
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user