diff --git a/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java b/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java index 1786410..51eda37 100644 --- a/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java +++ b/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java @@ -138,19 +138,19 @@ public class DynmapFactionsPlugin extends JavaPlugin { return v; } - private boolean isVisible(String id) { + private boolean isVisible(String id, String worldname) { if((visible != null) && (visible.size() > 0)) { - if(visible.contains(id) == false) { + if((visible.contains(id) == false) && (visible.contains("world:" + worldname) == false)) { return false; } } if((hidden != null) && (hidden.size() > 0)) { - if(hidden.contains(id)) + if(hidden.contains(id) || hidden.contains("world:" + worldname)) return false; } return true; } - + private void addStyle(String resid, AreaMarker m) { AreaStyle as = cusstyle.get(resid); if(as == null) { @@ -224,7 +224,7 @@ public class DynmapFactionsPlugin extends JavaPlugin { String desc = formatInfoWindow(fact); /* Handle areas */ - if(isVisible(factname)) { + if(isVisible(factname, world)) { if(blocks.isEmpty()) return; LinkedList nodevals = new LinkedList(); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 8da0def..0d4a191 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -25,9 +25,11 @@ regionstyle: homeicon: "redflag" # Optional setting to limit which regions to show, by name - if commented out, all regions are shown +# To show all regions on a given world, add 'world:' to the list visibleregions: [ ] # Optional setting to hide specific regions, by name +# To hide all regions on a given world, add 'world:' to the list hiddenregions: [ ] # Optional per-region overrides for regionstyle (any defined replace those in regionstyle)