From 7cf75873b87d5292c1ccd4461014fa6f7d0b0e0a Mon Sep 17 00:00:00 2001 From: mikeprimm Date: Mon, 23 May 2011 08:06:08 -0700 Subject: [PATCH] Add hiddenworlds attribute to suppress templates on selected worlds --- src/main/java/org/dynmap/DynmapPlugin.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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;