Fixed noban, noexpel and bypassexpel permissions (#956)

This commit is contained in:
BONNe 2019-09-25 13:33:20 +03:00 committed by Florian CUNY
parent 6b42d07185
commit ff04f407af
2 changed files with 4 additions and 4 deletions

View File

@ -79,9 +79,7 @@ public class IslandBanCommand extends CompositeCommand {
}
target = User.getInstance(targetUUID);
// Cannot ban ops
if (target.isOp() || (target.isOnline() && target.hasPermission(
getAddon()
.getPermissionPrefix() + "admin.noban"))) {
if (target.isOp() || (target.isOnline() && target.hasPermission(this.getPermissionPrefix() + "admin.noban"))) {
user.sendMessage("commands.island.ban.cannot-ban");
return false;
}

View File

@ -84,7 +84,9 @@ public class IslandExpelCommand extends CompositeCommand {
return false;
}
// Cannot ban ops
if (target.isOp() || target.hasPermission("admin.noexpel") || target.hasPermission("mod.bypassexpel")) {
if (target.isOp() ||
target.hasPermission(this.getPermissionPrefix() + "admin.noexpel") ||
target.hasPermission(this.getPermissionPrefix() + "mod.bypassexpel")) {
user.sendMessage(CANNOT_EXPEL);
return false;
}