summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-03-04 10:39:39 +0000
committerElgarL <ElgarL@palmergames.com>2012-03-04 10:39:39 +0000
commit7ba49afa0b3095e678f91412f991db4bf82a84b9 (patch)
treee30e07e07ecb2d0c7f6d4445215d43efac47170f /EssentialsGroupManager/src
parentc33499797ebe490b44618014459ab6341cb964c1 (diff)
downloadEssentials-7ba49afa0b3095e678f91412f991db4bf82a84b9.tar
Essentials-7ba49afa0b3095e678f91412f991db4bf82a84b9.tar.gz
Essentials-7ba49afa0b3095e678f91412f991db4bf82a84b9.tar.lz
Essentials-7ba49afa0b3095e678f91412f991db4bf82a84b9.tar.xz
Essentials-7ba49afa0b3095e678f91412f991db4bf82a84b9.zip
Better reporting when a users.yml is failing to load.
Diffstat (limited to 'EssentialsGroupManager/src')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java7
2 files changed, 8 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 9ea8082c0..d28696f5f 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -147,4 +147,5 @@ v 1.9:
- Prevent adding inheritances and info nodes to globalgroups. These are permissions collections, not player groups.
- Prevent promoting players to, and demoting to GlobalGroups.
- Make 'manload' reload the config correctly.
- - Minor optimization when checking bukkit permissions. \ No newline at end of file
+ - Minor optimization when checking bukkit permissions.
+ - Better reporting when a users.yml is failing to load. \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
index e766b6c78..a01381fcd 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
@@ -602,7 +602,12 @@ public class WorldDataHolder {
// Load users if the file is NOT empty
if (allUsersNode != null)
for (String usersKey : allUsersNode.keySet()) {
- Map<String, Object> thisUserNode = (Map<String, Object>) allUsersNode.get(usersKey);
+ Map<String, Object> thisUserNode = null;
+ try {
+ thisUserNode = (Map<String, Object>) allUsersNode.get(usersKey);
+ } catch (Exception ex) {
+ throw new IllegalArgumentException("Bad format found in file: " + usersFile.getPath());
+ }
User thisUser = ph.createUser(usersKey);
if (thisUser == null) {
throw new IllegalArgumentException("I think this user was declared more than once: " + usersKey + " in file: " + usersFile.getPath());