diff options
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java | 8 |
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);
|