summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
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
commit3740f200f8dc99c05e42201d8b23ffc279cbd6a6 (patch)
tree844c3c2c18b66197af348abd7e93fa0bbdd2915d /EssentialsGroupManager/src
parent33382f9940bbb2bca5597557b198279e6d8e5e31 (diff)
downloadEssentials-3740f200f8dc99c05e42201d8b23ffc279cbd6a6.tar
Essentials-3740f200f8dc99c05e42201d8b23ffc279cbd6a6.tar.gz
Essentials-3740f200f8dc99c05e42201d8b23ffc279cbd6a6.tar.lz
Essentials-3740f200f8dc99c05e42201d8b23ffc279cbd6a6.tar.xz
Essentials-3740f200f8dc99c05e42201d8b23ffc279cbd6a6.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')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt1
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java8
2 files changed, 8 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index f3bc35baa..be9ec8abd 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -213,3 +213,4 @@ v 2.0:
- Prevent '*' permissions granting the 'groupmanager.noofflineperms' permission.
- Added '/mancheckw <world>' to inspect which permission files a world is referencing.
- Add config potion to set if GM commands should be allowed on CommnandBlocks.
+ - Catch the error when using an out of date config for 'allow_commandblocks' So it doesn't kill the whole config. \ No newline at end of file
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");