summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-01-18 01:25:25 +0000
committerElgarL <ElgarL@palmergames.com>2012-01-18 01:25:25 +0000
commit64af5b465dbb7fc41d03a49cfd7c331beb389c0e (patch)
tree0c7eb7df3734493135e1fe52440431a07fb01f2a /EssentialsGroupManager
parent89c41b0508edd847316a293926fb56a7b249e6ba (diff)
downloadEssentials-64af5b465dbb7fc41d03a49cfd7c331beb389c0e.tar
Essentials-64af5b465dbb7fc41d03a49cfd7c331beb389c0e.tar.gz
Essentials-64af5b465dbb7fc41d03a49cfd7c331beb389c0e.tar.lz
Essentials-64af5b465dbb7fc41d03a49cfd7c331beb389c0e.tar.xz
Essentials-64af5b465dbb7fc41d03a49cfd7c331beb389c0e.zip
Added a tidy error message for invalid permission entries in
GlobalGroups.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java8
2 files changed, 8 insertions, 3 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 876dc28b7..741777748 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -103,4 +103,5 @@ v 1.8:
- Catch NullPointerErrors generated by blank permission nodes.
- Removed '- bukkit.command' form the globalgroups permission nodes.
v 1.9:
- - Optimize populating Bukkit perms so we no longer calculate the child nodes (Bukkit already does this). \ No newline at end of file
+ - Optimize populating Bukkit perms so we no longer calculate the child nodes (Bukkit already does this).
+ - Added a tidy error message for invalid permission entries in GlobalGroups. \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
index f1bf10985..d9715d4be 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
@@ -125,8 +125,12 @@ public class GlobalGroups {
if (element != null)
if (element instanceof List) {
- for (String node : (List<String>) element) {
- newGroup.addPermission(node);
+ try {
+ for (String node : (List<String>) element) {
+ newGroup.addPermission(node);
+ }
+ } catch (ClassCastException e) {
+ throw new IllegalArgumentException("Invalid permission node for global group: " + groupName);
}
} else if (element instanceof String) {
newGroup.addPermission((String) element);