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 | 3767df465fee343aefcb2687115da67d44954737 (patch) | |
tree | 49cad354f520dee96c73c68767dd2bb529a0c83d /EssentialsGroupManager | |
parent | ce0fdbb5cb07b556ffc00d7a543dc34758c10a98 (diff) | |
download | Essentials-3767df465fee343aefcb2687115da67d44954737.tar Essentials-3767df465fee343aefcb2687115da67d44954737.tar.gz Essentials-3767df465fee343aefcb2687115da67d44954737.tar.lz Essentials-3767df465fee343aefcb2687115da67d44954737.tar.xz Essentials-3767df465fee343aefcb2687115da67d44954737.zip |
Throw a better error than 'null' when someone removes all groups from a
yml.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 99133244e..aa49a1757 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -186,4 +186,5 @@ v 2.0: - Allow 'manucheckp' to notify when superperms reports false but it is really negated.
- Only output a Data update message if something has changed.
- Fix loading users with only numerals in their names to be seen as strings.
- - Ignore any sub folders in the Worlds folder which start with a period (fix for storing data in svn respoitories).
\ No newline at end of file + - Ignore any sub folders in the Worlds folder which start with a period (fix for storing data in svn respoitories).
+ - Throw a better error than 'null' when someone removes all groups from a yml.
\ 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 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; |