Fix an error with Logging set to 'OFF' triggering a cast exception.

This commit is contained in:
ElgarL 2012-08-14 13:26:02 +01:00
parent 72aeec58ed
commit 84f7859ca9
2 changed files with 6 additions and 3 deletions

View File

@ -192,4 +192,5 @@ v 2.0:
- Change to our own Yaml parsing for globalgroups instead of using the YAMLConfiguration class in bukkit.
- Fix a cases sensitivity bug in world loading.
- Stop using the YamlConfiguration in bukkit for our config handling. We can now support periods in world names.
- Fix GlobalGroups not loading permission nodes.
- Fix GlobalGroups not loading permission nodes.
- Fix an error with Logging set to 'OFF' triggering a cast exception.

View File

@ -25,7 +25,7 @@ public class GMConfiguration {
private boolean toggleValidate;
private Integer saveInterval;
private Integer backupDuration;
private String loggerLevel;
private String loggerLevel = "OFF";
private Map<String, Object> mirrorsMap;
@ -82,7 +82,9 @@ public class GMConfiguration {
saveInterval = (Integer) save.get("minutes");
backupDuration = (Integer) save.get("hours");
loggerLevel = ((Map<String, String>) getElement("settings", GMconfig).get("logging")).get("level");
Object level = ((Map<String, String>) getElement("settings", GMconfig).get("logging")).get("level");
if (level instanceof String)
level = (String) level;
/*
* Store our mirrors map for parsing later.