Reverted map-structure for worlds, so that worlds have an order again.
This reverts commit0f4a8c2023,eb76fbe007and1b827459d0.
This commit is contained in:
parent
ce61394401
commit
8e946bcba2
2 changed files with 10 additions and 8 deletions
|
|
@ -177,13 +177,13 @@ worlds:
|
||||||
# Worlds can be handled by templates, based on world type
|
# Worlds can be handled by templates, based on world type
|
||||||
# You can override the properties of the template by specifying them in this section
|
# You can override the properties of the template by specifying them in this section
|
||||||
# for example 'Title: "My Awesome World"'
|
# for example 'Title: "My Awesome World"'
|
||||||
#world:
|
#- name: world
|
||||||
# title: "World"
|
# title: "World"
|
||||||
# # Use 'enabled: false' to disable a certain world.
|
# Use 'enabled: false' to disable a certain world.
|
||||||
# enabled: false
|
# 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
|
# 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:
|
# center:
|
||||||
# x: 0
|
# x: 0
|
||||||
# y: 64
|
# y: 64
|
||||||
|
|
@ -224,7 +224,7 @@ worlds:
|
||||||
#- name: world2
|
#- name: world2
|
||||||
# title: "Second World"
|
# title: "Second World"
|
||||||
#
|
#
|
||||||
#nether:
|
#- name: nether
|
||||||
# title: "Nether"
|
# title: "Nether"
|
||||||
# center:
|
# center:
|
||||||
# x: 0
|
# x: 0
|
||||||
|
|
|
||||||
|
|
@ -406,9 +406,11 @@ public class DynmapPlugin extends JavaPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private ConfigurationNode getWorldConfigurationNode(String worldName) {
|
private ConfigurationNode getWorldConfigurationNode(String worldName) {
|
||||||
ConfigurationNode worlds = configuration.getNode("worlds");
|
for(ConfigurationNode worldNode : configuration.getNodes("worlds")) {
|
||||||
if (worlds != null)
|
if (worldName.equals(worldNode.getString("name"))) {
|
||||||
return configuration.getNode("worlds").getNode(worldName);
|
return worldNode;
|
||||||
|
}
|
||||||
|
}
|
||||||
return new ConfigurationNode();
|
return new ConfigurationNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue