mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-01 06:33:38 +01:00
Merge pull request #161 from mikeprimm/master
Add hiddenworlds list to suppress templates on listed worlds
This commit is contained in:
commit
d75a0ea325
@ -169,7 +169,10 @@ template:
|
|||||||
prefix: nt
|
prefix: nt
|
||||||
maximumheight: 127
|
maximumheight: 127
|
||||||
colorscheme: default
|
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.
|
# The maptypes Dynmap will use to render.
|
||||||
worlds:
|
worlds:
|
||||||
|
@ -379,6 +379,8 @@ 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]);
|
||||||
@ -386,6 +388,9 @@ public class DynmapPlugin extends JavaPlugin {
|
|||||||
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…
Reference in New Issue
Block a user