summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-01-31 03:16:34 +0000
committerElgarL <ElgarL@palmergames.com>2012-01-31 03:16:34 +0000
commit3f02bcd702f890d1ccba35e2217b61d730ff9953 (patch)
tree26da6a65de19085a37bb2366408adbf5701c3645
parentfe050dd72591dc22a370ff4517bd30396fe36956 (diff)
downloadEssentials-3f02bcd702f890d1ccba35e2217b61d730ff9953.tar
Essentials-3f02bcd702f890d1ccba35e2217b61d730ff9953.tar.gz
Essentials-3f02bcd702f890d1ccba35e2217b61d730ff9953.tar.lz
Essentials-3f02bcd702f890d1ccba35e2217b61d730ff9953.tar.xz
Essentials-3f02bcd702f890d1ccba35e2217b61d730ff9953.zip
Catch all errors in badly formatted groups.
-rw-r--r--EssentialsGroupManager/.project2
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java11
3 files changed, 9 insertions, 7 deletions
diff --git a/EssentialsGroupManager/.project b/EssentialsGroupManager/.project
index 0562b3e0f..c0e5a6f5e 100644
--- a/EssentialsGroupManager/.project
+++ b/EssentialsGroupManager/.project
@@ -16,7 +16,7 @@
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/New_Builder.launch</value>
+ <value>&lt;project&gt;/.externalToolBuilders/GroupManager.launch</value>
</dictionary>
</arguments>
</buildCommand>
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 770dbe8e2..490df8fc6 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -132,4 +132,5 @@ v 1.9:
- '*'
- -vanish.*
- vanish.standard
- - Track the 'onPlayerChangeWorld' event as some teleports seem to not be triggering a world move. \ No newline at end of file
+ - Track the 'onPlayerChangeWorld' event as some teleports seem to not be triggering a world move.
+ - Catch all errors in badly formatted groups. \ 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 4fe1daaa5..581f17770 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
@@ -445,7 +445,7 @@ public class WorldDataHolder {
//PROCESS GROUPS FILE
Map<String, List<String>> inheritance = new HashMap<String, List<String>>();
- //try {
+ try {
Map<String, Object> allGroupsNode = (Map<String, Object>) groupsRootDataNode.get("groups");
for (String groupKey : allGroupsNode.keySet()) {
Map<String, Object> thisGroupNode = (Map<String, Object>) allGroupsNode.get(groupKey);
@@ -514,10 +514,11 @@ public class WorldDataHolder {
}else
throw new IllegalArgumentException("Unknown entry found in inheritance section for group: " + thisGrp.getName() + " in file: " + groupsFile.getPath());
}
- //} catch (Exception ex) {
- // ex.printStackTrace();
- // throw new IllegalArgumentException("Your Permissions config file is invalid. See console for details.");
- //}
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new IllegalArgumentException("Your " + groupsFile.getPath() + " file is invalid. See console for details.");
+ }
+
if (ph.getDefaultGroup() == null) {
throw new IllegalArgumentException("There was no Default Group declared in file: " + groupsFile.getPath());
}