Fixed reading world mirrors from the config.

This commit is contained in:
ElgarL 2011-10-16 01:23:25 +01:00
parent 03adb56d25
commit 121966436e
3 changed files with 9 additions and 8 deletions

View file

@ -45,4 +45,5 @@ v 1.4:
- Cleared remaining Cast errors cause by object cloning.
- 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.
Enable to allow default Bukkit based permissions to remain enabled, unless directly negated within GroupManager.
- Fixed reading world mirrors from the config.

View file

@ -58,9 +58,9 @@ public class GMConfiguration {
return GMconfig.getBoolean("settings.config.opOverrides", true);
}
@SuppressWarnings("unchecked")
public Map<String, Object> getMirrorsMap() {
return (Map<String, Object>) GMconfig.getList("settings.permission.world.mirror");
public Map<String, Object> getMirrorsMap() {
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false);
}
public Integer getSaveInterval() {

View file

@ -99,11 +99,11 @@ public class WorldsHolder {
* don't load any worlds which are already loaded
* or mirrored worlds that don't need data.
*/
if (worldsData.containsKey(folder.getName().toLowerCase())
|| mirrors.containsKey(folder.getName().toLowerCase())) {
continue;
if (!worldsData.containsKey(folder.getName().toLowerCase())
|| !mirrors.containsKey(folder.getName().toLowerCase())) {
loadWorld(folder.getName());
}
loadWorld(folder.getName());
}
}
}