summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2013-02-15 17:39:34 +0000
committerElgarL <ElgarL@palmergames.com>2013-02-15 17:39:34 +0000
commitd5813aec433d54df222910fb82bd3144fc24a454 (patch)
tree004a55c9be3844d10fc08fa1e47667d37f7c10f7 /EssentialsGroupManager/src/org/anjocaido
parent239e207c1e13c7052a728400459421a56b280647 (diff)
downloadEssentials-d5813aec433d54df222910fb82bd3144fc24a454.tar
Essentials-d5813aec433d54df222910fb82bd3144fc24a454.tar.gz
Essentials-d5813aec433d54df222910fb82bd3144fc24a454.tar.lz
Essentials-d5813aec433d54df222910fb82bd3144fc24a454.tar.xz
Essentials-d5813aec433d54df222910fb82bd3144fc24a454.zip
Catch the error when using an out of date config for
'allow_commandblocks' So it doesn't kill the whole config.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java
index e5a24258e..2f68b6d7d 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java
@@ -85,7 +85,13 @@ public class GMConfiguration {
try {
Map<String, Object> config = getElement("config", getElement("settings", GMconfig));
- allowCommandBlocks = (Boolean) config.get("allow_commandblocks");
+ try {
+ allowCommandBlocks = (Boolean) config.get("allow_commandblocks");
+
+ } catch (Exception ex) {
+ GroupManager.logger.log(Level.SEVERE, "Missing or corrupt 'allow_commandblocks' node. Using default settings", ex);
+ }
+
opOverride = (Boolean) config.get("opOverrides");
toggleValidate = (Boolean) config.get("validate_toggle");