diff options
author | ElgarL <ElgarL@palmergames.com> | 2013-02-25 12:47:23 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2013-02-25 12:47:23 +0000 |
commit | 643a9be9858c2d3292f7758124278a06f12496d9 (patch) | |
tree | b4a2513972cf97f78310f4e1fd857f0f19420e4e /EssentialsGroupManager/src/org/anjocaido | |
parent | 9f13653be676e2346abed5c58ff1aaeb861a51f8 (diff) | |
download | Essentials-643a9be9858c2d3292f7758124278a06f12496d9.tar Essentials-643a9be9858c2d3292f7758124278a06f12496d9.tar.gz Essentials-643a9be9858c2d3292f7758124278a06f12496d9.tar.lz Essentials-643a9be9858c2d3292f7758124278a06f12496d9.tar.xz Essentials-643a9be9858c2d3292f7758124278a06f12496d9.zip |
Only prevent adding nodes with '/manuaddp' and '/mangaddp' if they are
exact matches (not wildcards).
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index 74d39ecae..fbe0378d6 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -770,7 +770,8 @@ public class GroupManager extends JavaPlugin { } else if (permissionResult.resultType.equals(PermissionCheckResult.Type.FOUND)) { sender.sendMessage(ChatColor.RED + "The user already has direct access to that permission."); sender.sendMessage(ChatColor.RED + "Node: " + permissionResult.accessLevel); - return true; + if (permissionResult.accessLevel.equalsIgnoreCase(args[1])); + return true; } else if (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) { // Warn only while still allowing you to add the node. sender.sendMessage(ChatColor.RED + "The user already has a matching Negated node."); @@ -1026,7 +1027,9 @@ public class GroupManager extends JavaPlugin { } else if (permissionResult.resultType.equals(PermissionCheckResult.Type.FOUND)) { sender.sendMessage(ChatColor.RED + "The group already has direct access to that permission."); sender.sendMessage(ChatColor.RED + "Node: " + permissionResult.accessLevel); - return true; + // Abort adding if the node is a direct match. + if (permissionResult.accessLevel.equalsIgnoreCase(args[1])); + return true; } else if (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) { // Warn only while still allowing you to add the node. sender.sendMessage(ChatColor.RED + "The group already has a matching Negated node."); |