summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;