summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido/groupmanager
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
index 647d729e5..04d9e86be 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
@@ -159,12 +159,14 @@ public class GlobalGroups {
if (element instanceof List) {
try {
for (String node : (List<String>) element) {
- newGroup.addPermission(node);
+ if ((node != null) && !node.isEmpty())
+ newGroup.addPermission(node);
}
} catch (ClassCastException ex) {
throw new IllegalArgumentException("Invalid permission node for global group: " + groupName, ex);
}
} else if (element instanceof String) {
+ if ((element != null) && !((String)element).isEmpty())
newGroup.addPermission((String) element);
} else
throw new IllegalArgumentException("Unknown type of permission node for global group: " + groupName);