add mising isopoverride check

This commit is contained in:
Necrodoom 2013-03-03 18:35:05 +02:00
parent 69c40a2f1a
commit 061794e86d

View File

@ -1118,7 +1118,7 @@ public class GroupManager extends JavaPlugin {
}
// Validating your permissions
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
if (!isConsole && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {
if (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {
sender.sendMessage(ChatColor.RED + "Can't remove a permission you don't have.");
return true;
}
@ -1161,7 +1161,7 @@ public class GroupManager extends JavaPlugin {
for (auxString : auxGroup.getPermissionList()) {
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
if (!isConsole && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {
if (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {
sender.sendMessage(ChatColor.RED + "Can't remove a permission you don't have: '" + auxString + "'.");
}
else