Simplified config.yml while retaining backwards compatibility.

This commit is contained in:
ElgarL 2011-10-16 03:35:55 +01:00
parent 121966436e
commit e049364557
3 changed files with 13 additions and 6 deletions

View File

@ -46,4 +46,5 @@ v 1.4:
- Removed extra notification messages for the player issuing the group move command. - Removed extra notification messages for the player issuing the group move command.
- Added a config setting - bukkit_perms_override: false - Added a config setting - bukkit_perms_override: false
Enable to allow default Bukkit based permissions to remain enabled, unless directly negated within GroupManager. Enable to allow default Bukkit based permissions to remain enabled, unless directly negated within GroupManager.
- Fixed reading world mirrors from the config. - Fixed reading world mirrors from the config.
- Simplified config.yml while retaining backwards compatibility.

View File

@ -2,20 +2,22 @@ settings:
config: config:
# With this enabled anyone set as op has full permissions when managing GroupManager # With this enabled anyone set as op has full permissions when managing GroupManager
opOverrides: true opOverrides: true
# If enabled any bukkit permissiosn which default to true will be left enabled. # 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. # If the player is op any permissions set to Op will follow suit.
bukkit_perms_override: false bukkit_perms_override: false
data: data:
save: save:
# How often GroupManager will save it's data back to groups and users.yml # How often GroupManager will save it's data back to groups and users.yml
minutes: 10 minutes: 10
logging: logging:
# level of detail GroupManager will use when logging. # level of detail GroupManager will use when logging.
# Acceptable entries are - ALL,CONFIG,FINE,FINER,FINEST,INFO,OFF,SEVERE,WARNING # Acceptable entries are - ALL,CONFIG,FINE,FINER,FINEST,INFO,OFF,SEVERE,WARNING
level: INFO level: INFO
permission:
world: mirrors:
mirror:
# Worlds listed here have their permissions mirrored in their children. # Worlds listed here have their permissions mirrored in their children.
world: world:
- world_nether - world_nether

View File

@ -59,8 +59,12 @@ public class GMConfiguration {
} }
public Map<String, Object> getMirrorsMap() { public Map<String, Object> getMirrorsMap() {
// Try to fetch the old mirror path first
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false); if (GMconfig.isConfigurationSection("settings.permission.world.mirror"))
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false);
else
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.mirrors").getValues(false);
} }
public Integer getSaveInterval() { public Integer getSaveInterval() {