diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-08-14 13:26:02 +0100 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-08-14 13:26:02 +0100 |
commit | 84f7859ca96ee475afe9544ce7ff9b69aee939e4 (patch) | |
tree | 9c81bbe7b68cfa603df7c191c84a08e9732c74cf /EssentialsGroupManager | |
parent | 72aeec58ed5f2bc2f4892ec6586e6791e3f19897 (diff) | |
download | Essentials-84f7859ca96ee475afe9544ce7ff9b69aee939e4.tar Essentials-84f7859ca96ee475afe9544ce7ff9b69aee939e4.tar.gz Essentials-84f7859ca96ee475afe9544ce7ff9b69aee939e4.tar.lz Essentials-84f7859ca96ee475afe9544ce7ff9b69aee939e4.tar.xz Essentials-84f7859ca96ee475afe9544ce7ff9b69aee939e4.zip |
Fix an error with Logging set to 'OFF' triggering a cast exception.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 63fa8b9d7..498537647 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -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.
\ No newline at end of file + - Fix GlobalGroups not loading permission nodes.
+ - Fix an error with Logging set to 'OFF' triggering a cast exception.
\ 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 34b50825a..fcc018d17 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java @@ -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. |