Merge pull request #229 from mikeprimm/master

Fix reading of webpath by regions component - load from top-level setting, instead of component local config
This commit is contained in:
mikeprimm 2011-06-20 15:36:18 -07:00
commit 90bff11417
2 changed files with 5 additions and 1 deletions

View File

@ -466,4 +466,8 @@ public class DynmapPlugin extends JavaPlugin {
pluginManager.disablePlugin(this);
pluginManager.enablePlugin(this);
}
public String getWebPath() {
return configuration.getString("webpath", "web");
}
}

View File

@ -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;