diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-07-06 08:33:57 +0100 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-07-06 08:33:57 +0100 |
commit | 72015d42fc14c548a08f323be61e088a0edf156c (patch) | |
tree | 5cef3fb19df08eb4a80169fd2678bb183913df6c /EssentialsGroupManager/src/org | |
parent | 24ec84730e45d5e12f85d7954202c4e9dfeef70d (diff) | |
download | Essentials-72015d42fc14c548a08f323be61e088a0edf156c.tar Essentials-72015d42fc14c548a08f323be61e088a0edf156c.tar.gz Essentials-72015d42fc14c548a08f323be61e088a0edf156c.tar.lz Essentials-72015d42fc14c548a08f323be61e088a0edf156c.tar.xz Essentials-72015d42fc14c548a08f323be61e088a0edf156c.zip |
Throw a better error than 'null' when someone removes all groups from a
yml.
Diffstat (limited to 'EssentialsGroupManager/src/org')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java index 1ccd48772..3df3271a3 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java @@ -508,6 +508,10 @@ public class WorldDataHolder { } catch (Exception ex) { throw new IllegalArgumentException("Your " + groupsFile.getPath() + " file is invalid. See console for details.", ex); } + + if (allGroupsNode == null) { + throw new IllegalArgumentException("You have no groups in " + groupsFile.getPath() + "."); + } Iterator<String> groupItr = allGroupsNode.keySet().iterator(); String groupKey; |