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 | fa7688b4b5e6429f32b716d252e33b23d3730ec1 (patch) | |
tree | 4973a4093a8dd8ba1b8c1a26f068d4f7370108dc /EssentialsGroupManager | |
parent | 017136ff1cdfc173f8ffd3dc80f029607ce112b0 (diff) | |
download | Essentials-fa7688b4b5e6429f32b716d252e33b23d3730ec1.tar Essentials-fa7688b4b5e6429f32b716d252e33b23d3730ec1.tar.gz Essentials-fa7688b4b5e6429f32b716d252e33b23d3730ec1.tar.lz Essentials-fa7688b4b5e6429f32b716d252e33b23d3730ec1.tar.xz Essentials-fa7688b4b5e6429f32b716d252e33b23d3730ec1.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; |