diff options
author | ementalo <suror@gmx.co.uk> | 2012-01-25 14:29:05 +0000 |
---|---|---|
committer | ementalo <suror@gmx.co.uk> | 2012-01-25 14:29:05 +0000 |
commit | 270533652b2013b7a87ec70a0d331c2fb3b0dc02 (patch) | |
tree | 573570658a80ee197687bb7f111dade2b29132ac | |
parent | 03d640260d241cf796cad9c556fba2588f6c47a2 (diff) | |
parent | 324dd05c97bbdc05f7510c2c5a551c42765ef9bb (diff) | |
download | Essentials-270533652b2013b7a87ec70a0d331c2fb3b0dc02.tar Essentials-270533652b2013b7a87ec70a0d331c2fb3b0dc02.tar.gz Essentials-270533652b2013b7a87ec70a0d331c2fb3b0dc02.tar.lz Essentials-270533652b2013b7a87ec70a0d331c2fb3b0dc02.tar.xz Essentials-270533652b2013b7a87ec70a0d331c2fb3b0dc02.zip |
Merge branch 'master' into release
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java | 61 | ||||
-rw-r--r-- | lib/bukkit.jar | bin | 4707726 -> 4716477 bytes | |||
-rw-r--r-- | lib/craftbukkit.jar | bin | 10707001 -> 10722858 bytes |
4 files changed, 33 insertions, 31 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 70f778247..5307c43dc 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -117,4 +117,5 @@ v 1.9: - Changed addSubGroup() to only add the group if it doesn't already exist (no need to update an already existing group).
- addSubGroup now returns a boolean for success/failure.
- '/manuaddsub' now correctly reports if it was able to add the sub group.
- - Allow negation to the * permission node when populating superperms.
\ No newline at end of file + - Allow negation to the * permission node when populating superperms.
+ - Fix trying to modify an unmodifiable collection breaking superperms.
\ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java index e326ff624..de42ce9c3 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java @@ -153,41 +153,42 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface { // Allow * node to populate ALL perms in Bukkit. if (perms.contains("*")) { permArray.addAll(GroupManager.BukkitPermissions.getAllRegisteredPermissions(includeChildren)); - perms.remove("*"); } for (String perm : perms) { - boolean negated = false; - if (perm.startsWith("-")) - negated = true; - - if (!permArray.contains(perm)) { - permArray.add(perm); + if (!perm.equalsIgnoreCase("*")) { + boolean negated = false; + if (perm.startsWith("-")) + negated = true; - if ((negated) && (permArray.contains(perm.substring(1)))) - permArray.remove(perm.substring(1)); - - if (includeChildren) { - - Map<String, Boolean> children = GroupManager.BukkitPermissions.getAllChildren((negated ? perm.substring(1) : perm), new HashSet<String>()); - - if (children != null) { - if (negated) { - - // Remove children of negated nodes - for (String child : children.keySet()) - if (children.get(child)) - if (permArray.contains(child)) - permArray.remove(child); - - } else { - - // Add child nodes - for (String child : children.keySet()) - if (children.get(child)) - if ((!permArray.contains(child)) && (!permArray.contains("-" + child))) - permArray.add(child); + if (!permArray.contains(perm)) { + permArray.add(perm); + + if ((negated) && (permArray.contains(perm.substring(1)))) + permArray.remove(perm.substring(1)); + + if (includeChildren) { + + Map<String, Boolean> children = GroupManager.BukkitPermissions.getAllChildren((negated ? perm.substring(1) : perm), new HashSet<String>()); + + if (children != null) { + if (negated) { + + // Remove children of negated nodes + for (String child : children.keySet()) + if (children.get(child)) + if (permArray.contains(child)) + permArray.remove(child); + + } else { + + // Add child nodes + for (String child : children.keySet()) + if (children.get(child)) + if ((!permArray.contains(child)) && (!permArray.contains("-" + child))) + permArray.add(child); + } } } } diff --git a/lib/bukkit.jar b/lib/bukkit.jar Binary files differindex 14f2e6e0b..394d5b667 100644 --- a/lib/bukkit.jar +++ b/lib/bukkit.jar diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar Binary files differindex f22af8eca..52bda3246 100644 --- a/lib/craftbukkit.jar +++ b/lib/craftbukkit.jar |