Add hiddenworlds attribute to suppress templates on selected worlds
This commit is contained in:
parent
fd6d1d4270
commit
4fb058a9a3
1 changed files with 6 additions and 1 deletions
|
|
@ -379,13 +379,18 @@ public class DynmapPlugin extends JavaPlugin {
|
||||||
worlds = new ArrayList<ConfigurationNode>();
|
worlds = new ArrayList<ConfigurationNode>();
|
||||||
worldsupdated = true;
|
worldsupdated = true;
|
||||||
}
|
}
|
||||||
|
List<String> hiddenworlds = node.getStrings("hiddenworlds", Collections.EMPTY_LIST);
|
||||||
|
|
||||||
/* Iternate by world type - so that order in templateworldtypes drives our default order */
|
/* Iternate by world type - so that order in templateworldtypes drives our default order */
|
||||||
for(int wtype = 0; wtype < templateworldtypes.length; wtype++) {
|
for(int wtype = 0; wtype < templateworldtypes.length; wtype++) {
|
||||||
ConfigurationNode typetemplate = template.getNode(templateworldtypes[wtype]);
|
ConfigurationNode typetemplate = template.getNode(templateworldtypes[wtype]);
|
||||||
if(typetemplate == null)
|
if(typetemplate == null)
|
||||||
continue;
|
continue;
|
||||||
for(World w : getServer().getWorlds()) { /* Roll through worlds */
|
for(World w : getServer().getWorlds()) { /* Roll through worlds */
|
||||||
String wn = w.getName();
|
String wn = w.getName();
|
||||||
|
/* Skip processing on hidden worlds */
|
||||||
|
if(hiddenworlds.contains(wn))
|
||||||
|
continue;
|
||||||
/* Find node for this world, if any */
|
/* Find node for this world, if any */
|
||||||
ConfigurationNode world = null;
|
ConfigurationNode world = null;
|
||||||
int index;
|
int index;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue