diff options
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java index 2b6a80da6..4ef77687a 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java @@ -631,7 +631,6 @@ public class WorldDataHolder { } else throw new IllegalArgumentException("Unknown entry found in Info section for group: " + thisGrp.getName() + " in file: " + groupsFile.getPath()); - //END INFO NODE if (thisGroupNode.get("inheritance") == null || thisGroupNode.get("inheritance") instanceof List) { @@ -753,14 +752,19 @@ public class WorldDataHolder { } - //USER INFO NODE - BETA - + //USER INFO NODE + //INFO NODE - Map<String, Object> infoNode = (Map<String, Object>) thisUserNode.get("info"); - if (infoNode != null) { - thisUser.setVariables(infoNode); - } - //END INFO NODE - BETA + if (thisUserNode.get("info") instanceof Map) { + Map<String, Object> infoNode = (Map<String, Object>) thisUserNode.get("info"); + if (infoNode != null) { + thisUser.setVariables(infoNode); + } + } else if (thisUserNode.get("info") != null) + throw new IllegalArgumentException("Unknown entry found in Info section for user: " + thisUser.getName() + " in file: " + usersFile.getPath()); + + //END INFO NODE + if (thisUserNode.get("group") != null) { Group hisGroup = ph.getGroup(thisUserNode.get("group").toString()); |