Merge pull request #361 from necrodoom/patch-66

add catches for the last 2 config settings
This commit is contained in:
ElgarL 2013-02-26 08:49:40 -08:00
commit f5ed4dd6cd

View File

@ -87,13 +87,21 @@ public class GMConfiguration {
try { try {
allowCommandBlocks = (Boolean) config.get("allow_commandblocks"); allowCommandBlocks = (Boolean) config.get("allow_commandblocks");
} catch (Exception ex) { } catch (Exception ex) {
GroupManager.logger.log(Level.SEVERE, "Missing or corrupt 'allow_commandblocks' node. Using default settings", ex); GroupManager.logger.log(Level.SEVERE, "Missing or corrupt 'allow_commandblocks' node. Using default settings", ex);
} }
opOverride = (Boolean) config.get("opOverrides"); try {
toggleValidate = (Boolean) config.get("validate_toggle"); opOverride = (Boolean) config.get("opOverrides");
} catch (Exception ex) {
GroupManager.logger.log(Level.SEVERE, "Missing or corrupt 'opOverrides' node. Using default settings", ex);
}
try {
toggleValidate = (Boolean) config.get("validate_toggle");
} catch (Exception ex) {
GroupManager.logger.log(Level.SEVERE, "Missing or corrupt 'validate_toggle' node. Using default settings", ex);
}
/* /*
* data node for save/backup timers. * data node for save/backup timers.