From 231f9d49c1326f02253a8b121e38d2d92f5e71e3 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Thu, 28 Mar 2013 13:10:17 +0000 Subject: [PATCH] Fix loops. --- .../org/anjocaido/groupmanager/GroupManager.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index e27389d7a..10e970de9 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -875,14 +875,14 @@ public class GroupManager extends JavaPlugin { sender.sendMessage(ChatColor.RED + "You can't modify a player with same group as you, or higher."); return true; } - for (auxString : auxUser.getPermissionList()) { - permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString); + for (String perm : auxUser.getPermissionList()) { + permissionResult = permissionHandler.checkFullUserPermission(senderUser, perm); if (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) { - sender.sendMessage(ChatColor.RED + "You can't remove a permission you don't have: '" + auxString + "'."); + sender.sendMessage(ChatColor.RED + "You can't remove a permission you don't have: '" + perm + "'."); } else { - auxUser.removePermission(auxString); + auxUser.removePermission(perm); } } sender.sendMessage(ChatColor.YELLOW + "You removed all permissions from player '" + auxUser.getName() + "'."); @@ -1159,14 +1159,14 @@ public class GroupManager extends JavaPlugin { return true; } - for (auxString : auxGroup.getPermissionList()) { - permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString); + for (String perm : auxGroup.getPermissionList()) { + permissionResult = permissionHandler.checkFullUserPermission(senderUser, perm); 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 + "'."); + sender.sendMessage(ChatColor.RED + "Can't remove a permission you don't have: '" + perm + "'."); } else { - auxGroup.removePermission(auxString); + auxGroup.removePermission(perm); } } sender.sendMessage(ChatColor.YELLOW + "You removed all permissions from group '" + auxGroup.getName() + "'.");