diff options
author | ElgarL <ElgarL@palmergames.com> | 2013-02-15 17:39:34 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2013-02-15 17:39:34 +0000 |
commit | 3740f200f8dc99c05e42201d8b23ffc279cbd6a6 (patch) | |
tree | 844c3c2c18b66197af348abd7e93fa0bbdd2915d /EssentialsGroupManager/src | |
parent | 33382f9940bbb2bca5597557b198279e6d8e5e31 (diff) | |
download | Essentials-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.txt | 1 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java | 8 |
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"); |