summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-07-06 08:33:57 +0100
committerElgarL <ElgarL@palmergames.com>2012-07-06 08:33:57 +0100
commit72015d42fc14c548a08f323be61e088a0edf156c (patch)
tree5cef3fb19df08eb4a80169fd2678bb183913df6c /EssentialsGroupManager/src
parent24ec84730e45d5e12f85d7954202c4e9dfeef70d (diff)
downloadEssentials-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')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java4
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;