From 5c1db129d37cf30dda2f9acca6f0221f5ef04914 Mon Sep 17 00:00:00 2001 From: montlikadani Date: Sun, 26 Aug 2018 21:13:05 +0200 Subject: [PATCH] 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. --- .../src/com/earth2me/essentials/commands/Commandkickall.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java b/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java index 5c96af2c2..5a50e7db2 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java @@ -20,7 +20,9 @@ public class Commandkickall extends EssentialsCommand { for (Player onlinePlayer : ess.getOnlinePlayers()) { 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"));