summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-08-31 22:28:21 +0100
committerKHobbits <rob@khobbits.co.uk>2012-08-31 22:28:21 +0100
commit9cd396ebf841f615db336d8971992446116a7675 (patch)
tree6805ef780ef72d3a719ff53dbc5f90b444a44595
parent58b675955657e10f8459e962ef4a0ea1973da91d (diff)
parent286c5293d8089b04cd3f131b7e344d9b72668cc0 (diff)
downloadEssentials-9cd396ebf841f615db336d8971992446116a7675.tar
Essentials-9cd396ebf841f615db336d8971992446116a7675.tar.gz
Essentials-9cd396ebf841f615db336d8971992446116a7675.tar.lz
Essentials-9cd396ebf841f615db336d8971992446116a7675.tar.xz
Essentials-9cd396ebf841f615db336d8971992446116a7675.zip
Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9
-rw-r--r--EssentialsGroupManager/src/Changelog.txt4
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java6
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java12
3 files changed, 15 insertions, 7 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 2f535277b..5b409d773 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -194,4 +194,6 @@ v 2.0:
- Stop using the YamlConfiguration in bukkit for our config handling. We can now support periods in world names.
- Fix GlobalGroups not loading permission nodes.
- Fix an error with Logging set to 'OFF' triggering a cast exception.
- - No more null errors from corrupt config.yml's. \ No newline at end of file
+ - No more null errors from corrupt config.yml's.
+ - Give a better error when a subgroup is null.
+ - Include the GM version when logging errors. \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index 61bb41dd1..46ec861a3 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -246,7 +246,7 @@ public class GroupManager extends JavaPlugin {
lastError = ex.getMessage();
GroupManager.logger.severe("===================================================");
- GroupManager.logger.severe("= ERROR REPORT START =");
+ GroupManager.logger.severe("= ERROR REPORT START - " + this.getDescription().getVersion() + " =");
GroupManager.logger.severe("===================================================");
GroupManager.logger.severe("=== PLEASE COPY AND PASTE THE ERROR.LOG FROM THE ==");
GroupManager.logger.severe("= GROUPMANAGER FOLDER TO AN ESSENTIALS DEVELOPER =");
@@ -258,7 +258,9 @@ public class GroupManager extends JavaPlugin {
// Append this error to the error log.
try {
- String error = "=============================== GM ERROR LOG ===============================\n\n";
+ String error = "=============================== GM ERROR LOG ===============================\n";
+ error += "= ERROR REPORT START - " + this.getDescription().getVersion() + " =\n\n";
+
error += Tasks.getStackTraceAsString(ex);
error += "\n============================================================================\n";
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
index 3df3271a3..aad59e5aa 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
@@ -861,11 +861,15 @@ public class WorldDataHolder {
*/
} else if (nodeData instanceof List) {
for (Object o : ((List) nodeData)) {
- Group subGrp = ph.getGroup(o.toString());
- if (subGrp != null) {
- thisUser.addSubGroup(subGrp);
+ if (o == null) {
+ GroupManager.logger.warning("Invalid Subgroup data for user: " + thisUser.getName() + ". Ignoring entry in file: " + usersFile.getPath());
} else {
- GroupManager.logger.warning("Subgroup '" + o.toString() + "' not found for user: " + thisUser.getName() + ". Ignoring entry in file: " + usersFile.getPath());
+ Group subGrp = ph.getGroup(o.toString());
+ if (subGrp != null) {
+ thisUser.addSubGroup(subGrp);
+ } else {
+ GroupManager.logger.warning("Subgroup '" + o.toString() + "' not found for user: " + thisUser.getName() + ". Ignoring entry in file: " + usersFile.getPath());
+ }
}
}
} else if (nodeData instanceof String) {