diff --git a/configuration.txt b/configuration.txt index 35d0ada2..d37e5679 100644 --- a/configuration.txt +++ b/configuration.txt @@ -177,13 +177,13 @@ worlds: # Worlds can be handled by templates, based on world type # You can override the properties of the template by specifying them in this section # for example 'Title: "My Awesome World"' - #- name: world + #world: # title: "World" - # Use 'enabled: false' to disable a certain world. + # # Use 'enabled: false' to disable a certain world. # enabled: false - # Use 'template: mycustomtemplate' to use the properties specified in the template 'mycustomtemplate' to this world. Default it is set to the environment-name (normal or nether). + # # Use 'template: mycustomtemplate' to use the properties specified in the template 'mycustomtemplate' to this world. Default it is set to the environment-name (normal or nether). # template: mycustomtemplate - # Rest of comes from template - uncomment to tailor for world specifically + # # Rest of comes from template - uncomment to tailor for world specifically # center: # x: 0 # y: 64 @@ -224,7 +224,7 @@ worlds: #- name: world2 # title: "Second World" # - #- name: nether + #nether # title: "Nether" # center: # x: 0 diff --git a/src/main/java/org/dynmap/DynmapPlugin.java b/src/main/java/org/dynmap/DynmapPlugin.java index c16f789a..3550e5fc 100644 --- a/src/main/java/org/dynmap/DynmapPlugin.java +++ b/src/main/java/org/dynmap/DynmapPlugin.java @@ -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) {