summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2012-08-07 20:13:27 +0200
committersnowleo <schneeleo@gmail.com>2012-08-07 20:13:27 +0200
commit76c04a55c4cb55e097c8bc1269c046abc0f46cfa (patch)
tree3c5d265f89bbbc5c63f86cc84c5d99d75097660e /EssentialsGroupManager
parenta1080e8487ef72833cb40c8f4cb3bc39c3b5c543 (diff)
parent72d98b2f67e55b9f15216c2c00c36a40874fd4ba (diff)
downloadEssentials-76c04a55c4cb55e097c8bc1269c046abc0f46cfa.tar
Essentials-76c04a55c4cb55e097c8bc1269c046abc0f46cfa.tar.gz
Essentials-76c04a55c4cb55e097c8bc1269c046abc0f46cfa.tar.lz
Essentials-76c04a55c4cb55e097c8bc1269c046abc0f46cfa.tar.xz
Essentials-76c04a55c4cb55e097c8bc1269c046abc0f46cfa.zip
Merge branch 'refs/heads/groupmanager' into 2.9
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
index cc8181ddf..d0f5fed8b 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
@@ -161,7 +161,11 @@ public class GlobalGroups {
Object element;
// Permission nodes
- element = ((Map<String, Object>)allGroups.get(groupName)).get("permissions");
+ try {
+ element = ((Map<String, Object>)allGroups.get(groupName)).get("permissions");
+ } catch ( Exception ex) {
+ throw new IllegalArgumentException("The GlobalGroup ' " + groupName + "' is formatted incorrectly: ", ex);
+ }
if (element != null)
if (element instanceof List) {
@@ -180,7 +184,11 @@ public class GlobalGroups {
throw new IllegalArgumentException("Unknown type of permission node for global group: " + groupName);
// Info nodes
- element = ((Map<String, Object>)allGroups.get(groupName)).get("info");
+ try {
+ element = ((Map<String, Object>)allGroups.get(groupName)).get("info");
+ } catch ( Exception ex) {
+ throw new IllegalArgumentException("The GlobalGroup ' " + groupName + "' is formatted incorrectly: ", ex);
+ }
if (element != null)
if (element instanceof MemorySection) {