Made configuration structure of worlds like templates (looks nicer :D).

This commit is contained in:
FrozenCow 2011-05-26 02:29:44 +02:00
parent 38dd39d75f
commit cee491f610
2 changed files with 9 additions and 11 deletions

View file

@ -406,12 +406,10 @@ public class DynmapPlugin extends JavaPlugin {
}
private ConfigurationNode getWorldConfigurationNode(String worldName) {
for(ConfigurationNode worldNode : configuration.getNodes("worlds")) {
if (worldName.equals(worldNode.getString("name"))) {
return worldNode;
}
}
return new ConfigurationNode();
ConfigurationNode result = configuration.getNode("worlds").getNode(worldName);
if (result == null)
return new ConfigurationNode();
return result;
}
private ConfigurationNode getTemplateConfigurationNode(String templateName) {