Doesn't kick all players if the player has permission (#2145) @montlikadani

So, if a player has permission (eg, an operator or more), they will not kick them out because of permission.
This commit is contained in:
montlikadani 2018-08-26 21:13:05 +02:00 committed by md678685
parent c718962426
commit 5c1db129d3

View File

@ -20,7 +20,9 @@ public class Commandkickall extends EssentialsCommand {
for (Player onlinePlayer : ess.getOnlinePlayers()) { for (Player onlinePlayer : ess.getOnlinePlayers()) {
if (!sender.isPlayer() || !onlinePlayer.getName().equalsIgnoreCase(sender.getPlayer().getName())) { if (!sender.isPlayer() || !onlinePlayer.getName().equalsIgnoreCase(sender.getPlayer().getName())) {
onlinePlayer.kickPlayer(kickReason); if (!onlinePlayer.isAuthorized("essentials.kickall.exempt")) {
onlinePlayer.kickPlayer(kickReason);
}
} }
} }
sender.sendMessage(tl("kickedAll")); sender.sendMessage(tl("kickedAll"));