summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-01-24 19:38:22 +0000
committerElgarL <ElgarL@palmergames.com>2012-01-24 19:38:22 +0000
commit8390594682b12f6ceccbad19a4992d11d87bad99 (patch)
tree561c787f1e3be4200f572d7279dc62d5c8e3e017 /EssentialsGroupManager
parenta13740f63846a4919a2185a90c60a10e5cf3a3b6 (diff)
downloadEssentials-8390594682b12f6ceccbad19a4992d11d87bad99.tar
Essentials-8390594682b12f6ceccbad19a4992d11d87bad99.tar.gz
Essentials-8390594682b12f6ceccbad19a4992d11d87bad99.tar.lz
Essentials-8390594682b12f6ceccbad19a4992d11d87bad99.tar.xz
Essentials-8390594682b12f6ceccbad19a4992d11d87bad99.zip
Allow negations with the * permission node when population superperms.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java12
2 files changed, 9 insertions, 6 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 5d9f1fff5..bec0af257 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -116,4 +116,5 @@ v 1.9:
- Fixed fetching world data so it no longer returns the mirrored world for groups. Each world data holder now points to the correct data set, so can be returned as an object.
- 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. \ No newline at end of file
+ - '/manuaddsub' now correctly reports if it was able to add the sub group.
+ - Allow negations with the * permission node when population 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 51c6dded5..e326ff624 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java
@@ -150,12 +150,14 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
Set<String> permArray = new HashSet<String>();
- for (String perm : perms) {
-
- // Allow * node to populate ALL perms in Bukkit.
- if (perm.equalsIgnoreCase("*"))
- permArray.addAll(GroupManager.BukkitPermissions.getAllRegisteredPermissions(includeChildren));
+ // 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;