diff --git a/src/main/java/org/dynmap/regions/RegionsComponent.java b/src/main/java/org/dynmap/regions/RegionsComponent.java index 61f49a9e..519d3e74 100644 --- a/src/main/java/org/dynmap/regions/RegionsComponent.java +++ b/src/main/java/org/dynmap/regions/RegionsComponent.java @@ -4,6 +4,9 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; import java.util.Map; import org.bukkit.World; @@ -67,6 +70,19 @@ public class RegionsComponent extends ClientComponent { File webWorldPath = new File(plugin.getWebPath()+"/standalone/", outputFileName); Map regionData = (Map) regionConfig.getProperty(configuration.getString("basenode", "regions")); + /* See if we have explicit list of regions to report - limit to this list if we do */ + List idlist = configuration.getStrings("visibleregions", null); + if(idlist != null) { + @SuppressWarnings("unchecked") + HashSet ids = new HashSet((Collection) regionData.keySet()); + for(String id : ids) { + /* If not in list, remove it */ + if(!idlist.contains(id)) { + regionData.remove(id); + } + } + } + if (webWorldPath.isAbsolute()) outputFile = webWorldPath; else {