diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-01-25 22:43:07 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-01-25 22:43:07 +0000 |
commit | 3708f2b3bba8b071ef947b3d05229df48701541d (patch) | |
tree | fdcd940d95ae8500e1e92d06f8d38a96b5030a80 | |
parent | e563405a7dcd462d6bae00189c89dd789509c8e0 (diff) | |
download | Essentials-3708f2b3bba8b071ef947b3d05229df48701541d.tar Essentials-3708f2b3bba8b071ef947b3d05229df48701541d.tar.gz Essentials-3708f2b3bba8b071ef947b3d05229df48701541d.tar.lz Essentials-3708f2b3bba8b071ef947b3d05229df48701541d.tar.xz Essentials-3708f2b3bba8b071ef947b3d05229df48701541d.zip |
Trap errors in fetching the mirrors map.
3 files changed, 8 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index ec4873184..980fa0bd0 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -120,4 +120,5 @@ v 1.9: - Allow negation to the * permission node when populating superperms.
- Fix trying to modify an unmodifiable collection breaking superperms.
- Fixed subgroups (I broke earlier).
- - Check for a null player object in the PlayerTeleportEvent.
\ No newline at end of file + - Check for a null player object in the PlayerTeleportEvent.
+ - Trap errors in fetching the mirrors map.
\ 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 591afe3fa..d830696e7 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java @@ -66,10 +66,12 @@ public class GMConfiguration { public Map<String, Object> getMirrorsMap() { // Try to fetch the old mirror path first - if (GMconfig.isConfigurationSection("settings.permission.world.mirror")) + if (GMconfig.isConfigurationSection("settings.permission.world.mirror")) { return (Map<String, Object>) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false); - else + } else if (GMconfig.isConfigurationSection("settings.mirrors")){ return (Map<String, Object>) GMconfig.getConfigurationSection("settings.mirrors").getValues(false); + } + return null; } diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java index 320fe3e26..686a5495d 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java @@ -116,7 +116,8 @@ public class WorldsHolder { public void mirrorSetUp() { mirrorsGroup.clear(); mirrorsUser.clear(); - Map<String, Object> mirrorsMap = plugin.getGMConfig().getMirrorsMap(); + Map<String, Object> mirrorsMap = plugin.getGMConfig().getMirrorsMap(); + if (mirrorsMap != null) { for (String source : mirrorsMap.keySet()) { // Make sure all non mirrored worlds have a set of data files. |