diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-12-31 07:59:27 -0800 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-12-31 07:59:27 -0800 |
commit | f210f8e20b60e04166273f62c3d791c07330cb74 (patch) | |
tree | dbf626aa0fe456262f6622704da098329b7722a3 /EssentialsGroupManager/src/org | |
parent | a73986a358ada2963c1c3cbbe252960e00721564 (diff) | |
parent | ccfc23d629b34cfde6eb155f962e8cfd62b6fedf (diff) | |
download | Essentials-f210f8e20b60e04166273f62c3d791c07330cb74.tar Essentials-f210f8e20b60e04166273f62c3d791c07330cb74.tar.gz Essentials-f210f8e20b60e04166273f62c3d791c07330cb74.tar.lz Essentials-f210f8e20b60e04166273f62c3d791c07330cb74.tar.xz Essentials-f210f8e20b60e04166273f62c3d791c07330cb74.zip |
Merge pull request #235 from necrodoom/patch-10
fix isOpOverride checks
Diffstat (limited to 'EssentialsGroupManager/src/org')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index c6a91c66c..8c6b49ea5 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -721,7 +721,7 @@ public class GroupManager extends JavaPlugin { auxUser = dataHolder.getUser(args[0]); } // Validating your permissions - if (!isConsole && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) { + if (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) { sender.sendMessage(ChatColor.RED + "Can't modify player with same group than you, or higher."); return false; } @@ -954,7 +954,7 @@ public class GroupManager extends JavaPlugin { } // Validating your permissions permissionResult = permissionHandler.checkFullUserPermission(senderUser, args[1]); - 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 + "You can't add a permission you don't have."); return false; } @@ -1545,7 +1545,7 @@ public class GroupManager extends JavaPlugin { auxUser = dataHolder.getUser(args[0]); } // Validating permission - if (!isConsole && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) { + if (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) { sender.sendMessage(ChatColor.RED + "Can't modify player with same permissions than you, or higher."); return false; } @@ -1579,7 +1579,7 @@ public class GroupManager extends JavaPlugin { auxUser = dataHolder.getUser(args[0]); } // Validating permission - if (!isConsole && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) { + if (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) { sender.sendMessage(ChatColor.RED + "You can't modify a player with same permissions as you, or higher."); return false; } |