mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
Catch the error when using an out of date config for
'allow_commandblocks' So it doesn't kill the whole config.
This commit is contained in:
parent
33382f9940
commit
3740f200f8
@ -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.
|
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user