From 2c3e8fbdc0df2dc1649e53c7dee1299c9864979b Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Mon, 20 Jun 2011 17:33:01 -0500 Subject: [PATCH] Fix reading of 'webpath' by Regions component - was reading its own config instead of top-level one --- src/main/java/org/dynmap/DynmapPlugin.java | 4 ++++ src/main/java/org/dynmap/regions/RegionsComponent.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/dynmap/DynmapPlugin.java b/src/main/java/org/dynmap/DynmapPlugin.java index 17d27aaa..1d58600a 100644 --- a/src/main/java/org/dynmap/DynmapPlugin.java +++ b/src/main/java/org/dynmap/DynmapPlugin.java @@ -466,4 +466,8 @@ public class DynmapPlugin extends JavaPlugin { pluginManager.disablePlugin(this); pluginManager.enablePlugin(this); } + + public String getWebPath() { + return configuration.getString("webpath", "web"); + } } diff --git a/src/main/java/org/dynmap/regions/RegionsComponent.java b/src/main/java/org/dynmap/regions/RegionsComponent.java index 823ea7f5..61f49a9e 100644 --- a/src/main/java/org/dynmap/regions/RegionsComponent.java +++ b/src/main/java/org/dynmap/regions/RegionsComponent.java @@ -65,7 +65,7 @@ public class RegionsComponent extends ClientComponent { outputFileName = outputFileName.substring(0, outputFileName.lastIndexOf("."))+".json"; - File webWorldPath = new File(this.configuration.getString("webpath", "web")+"/standalone/", outputFileName); + File webWorldPath = new File(plugin.getWebPath()+"/standalone/", outputFileName); Map regionData = (Map) regionConfig.getProperty(configuration.getString("basenode", "regions")); if (webWorldPath.isAbsolute()) outputFile = webWorldPath;