diff --git a/configuration.txt b/configuration.txt index fa99060b..a9c99d4c 100644 --- a/configuration.txt +++ b/configuration.txt @@ -169,7 +169,10 @@ template: prefix: nt maximumheight: 127 colorscheme: default - +# This list of worlds will be hidden - they will not be automatically initialized by templates +hiddenworlds: + - MyHiddenWorld + - AnotherHiddenWorld # The maptypes Dynmap will use to render. worlds: diff --git a/src/main/java/org/dynmap/DynmapPlugin.java b/src/main/java/org/dynmap/DynmapPlugin.java index 60bf6c5b..b5618831 100644 --- a/src/main/java/org/dynmap/DynmapPlugin.java +++ b/src/main/java/org/dynmap/DynmapPlugin.java @@ -379,13 +379,18 @@ public class DynmapPlugin extends JavaPlugin { worlds = new ArrayList(); worldsupdated = true; } + List hiddenworlds = node.getStrings("hiddenworlds", Collections.EMPTY_LIST); + /* Iternate by world type - so that order in templateworldtypes drives our default order */ for(int wtype = 0; wtype < templateworldtypes.length; wtype++) { ConfigurationNode typetemplate = template.getNode(templateworldtypes[wtype]); if(typetemplate == null) continue; 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 */ ConfigurationNode world = null; int index;