summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2013-02-25 10:27:01 +0000
committerElgarL <ElgarL@palmergames.com>2013-02-25 10:27:01 +0000
commit5f5a9adf318826c0d943c7c20f8da7a76b4ec212 (patch)
tree39c3e4b6227051b7b9b8a5e3252f4de05b4e1d1a
parent29746df914f009dfb813dc926d4020845ff5944f (diff)
downloadEssentials-5f5a9adf318826c0d943c7c20f8da7a76b4ec212.tar
Essentials-5f5a9adf318826c0d943c7c20f8da7a76b4ec212.tar.gz
Essentials-5f5a9adf318826c0d943c7c20f8da7a76b4ec212.tar.lz
Essentials-5f5a9adf318826c0d943c7c20f8da7a76b4ec212.tar.xz
Essentials-5f5a9adf318826c0d943c7c20f8da7a76b4ec212.zip
Don't allow adding a node with '/manuaddp' and '/mangaddp' which is
already negated.
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java8
2 files changed, 10 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 4e5225bc2..6226484d7 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -215,4 +215,5 @@ v 2.0:
- Add config potion to set if GM commands should be allowed on CommnandBlocks.
- Catch the error when using an out of date config for 'allow_commandblocks' So it doesn't kill the whole config.
- '/manselect' will no longer list duplicate worlds.
- - Added a new mirroring option in the config of 'all_unnamed_worlds'. This will cause all new or unnamed worlds to use this mirroring. \ No newline at end of file
+ - Added a new mirroring option in the config of 'all_unnamed_worlds'. This will cause all new or unnamed worlds to use this mirroring.
+ - Don't allow adding a node with '/manuaddp' and '/mangaddp' which is already negated. \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index fb39d28ee..bf9e49300 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -767,6 +767,10 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "The user already has direct access to that permission.");
sender.sendMessage(ChatColor.RED + "Node: " + permissionResult.accessLevel);
return true;
+ } else if (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) {
+ sender.sendMessage(ChatColor.RED + "The user already has a matching Negated node ");
+ sender.sendMessage(ChatColor.RED + "Node: " + permissionResult.accessLevel);
+ return true;
}
}
// Seems OK
@@ -1015,6 +1019,10 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "The group already has direct access to that permission.");
sender.sendMessage(ChatColor.RED + "Node: " + permissionResult.accessLevel);
return true;
+ } else if (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) {
+ sender.sendMessage(ChatColor.RED + "The group already has a matching Negated node ");
+ sender.sendMessage(ChatColor.RED + "Node: " + permissionResult.accessLevel);
+ return true;
}
}
// Seems OK