From e04936455780f0649d4ae7975aeadd061fad1d29 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Sun, 16 Oct 2011 03:35:55 +0100 Subject: Simplified config.yml while retaining backwards compatibility. --- EssentialsGroupManager/src/Changelog.txt | 3 ++- EssentialsGroupManager/src/config.yml | 8 +++++--- .../src/org/anjocaido/groupmanager/GMConfiguration.java | 8 ++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) (limited to 'EssentialsGroupManager') diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index c4c8f6f20..4f4851f0a 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -46,4 +46,5 @@ v 1.4: - Removed extra notification messages for the player issuing the group move command. - Added a config setting - bukkit_perms_override: false Enable to allow default Bukkit based permissions to remain enabled, unless directly negated within GroupManager. - - Fixed reading world mirrors from the config. \ No newline at end of file + - Fixed reading world mirrors from the config. + - Simplified config.yml while retaining backwards compatibility. \ No newline at end of file diff --git a/EssentialsGroupManager/src/config.yml b/EssentialsGroupManager/src/config.yml index 0977362a5..caa675527 100644 --- a/EssentialsGroupManager/src/config.yml +++ b/EssentialsGroupManager/src/config.yml @@ -2,20 +2,22 @@ settings: config: # With this enabled anyone set as op has full permissions when managing GroupManager opOverrides: true + # If enabled any bukkit permissiosn which default to true will be left enabled. # If the player is op any permissions set to Op will follow suit. bukkit_perms_override: false + data: save: # How often GroupManager will save it's data back to groups and users.yml minutes: 10 + logging: # level of detail GroupManager will use when logging. # Acceptable entries are - ALL,CONFIG,FINE,FINER,FINEST,INFO,OFF,SEVERE,WARNING level: INFO - permission: - world: - mirror: + + mirrors: # Worlds listed here have their permissions mirrored in their children. world: - world_nether diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java index e57ce139e..302f12b67 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java @@ -59,8 +59,12 @@ public class GMConfiguration { } public Map getMirrorsMap() { - - return (Map) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false); + // Try to fetch the old mirror path first + if (GMconfig.isConfigurationSection("settings.permission.world.mirror")) + return (Map) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false); + else + return (Map) GMconfig.getConfigurationSection("settings.mirrors").getValues(false); + } public Integer getSaveInterval() { -- cgit v1.2.3