Add support for world-level hide/show in visibleregions and hiddenregions using "world:<worldname>" syntax
This commit is contained in:
parent
74ab9442bd
commit
7dcae62dc4
@ -138,14 +138,14 @@ 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;
|
||||
@ -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<FactionBlock> nodevals = new LinkedList<FactionBlock>();
|
||||
|
@ -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:<worldname>' to the list
|
||||
visibleregions: [ ]
|
||||
|
||||
# Optional setting to hide specific regions, by name
|
||||
# To hide all regions on a given world, add 'world:<worldname>' to the list
|
||||
hiddenregions: [ ]
|
||||
|
||||
# Optional per-region overrides for regionstyle (any defined replace those in regionstyle)
|
||||
|
Loading…
Reference in New Issue
Block a user