mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 17:47:34 +01:00
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:
parent
c718962426
commit
5c1db129d3
@ -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"));
|
||||||
|
Loading…
Reference in New Issue
Block a user