From b27fcdbd4b1b5c9cdec33a31084b7fd9e8faab98 Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Tue, 18 Jan 2011 20:08:05 +0100 Subject: [PATCH] Changed configuration to key/value instead of full YAML. --- configuration.txt | 27 ++++++++++++++----------- src/main/java/org/dynmap/WebServer.java | 4 ++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/configuration.txt b/configuration.txt index 85f98e2b..90500a71 100644 --- a/configuration.txt +++ b/configuration.txt @@ -1,13 +1,16 @@ -renderinterval: 30 # How often a tile gets rendered (in seconds). -tilepath: web/tiles # The path where the tile-files are placed. -webpath: web # The path where the web-files are located. [JAR] to use the internal web-files supplied in the .jar-file. +# All paths in this configuration file are relative to Dynmap's data-folder: minecraft_server/plugins/dynmap/ -webserver: - address: 0.0.0.0 # The interface the webserver will bind to (0.0.0.0 is all interfaces). - port: 8123 # The port the webserver will listen on. -maps: - org.dynmap.kzedmap.KzedMap: - colorpath: [JAR] - renderers: - org.dynmap.kzedmap.DefaultTileRenderer: { prefix: t } - org.dynmap.kzedmap.CaveTileRenderer: { prefix: ct } \ No newline at end of file +# How often a tile gets rendered (in seconds). +renderinterval: 1 + +# The path where the tile-files are placed. +tilepath: web/tiles + +# The path where the web-files are located. +webpath: web + +# The network-interface the webserver will bind to (0.0.0.0 for all interfaces, 127.0.0.1 for only local access). +webserver-bindaddress: 0.0.0.0 + +# The TCP-port the webserver will listen on. +webserver-port: 8123 \ No newline at end of file diff --git a/src/main/java/org/dynmap/WebServer.java b/src/main/java/org/dynmap/WebServer.java index bb3b3abd..ce5adee4 100644 --- a/src/main/java/org/dynmap/WebServer.java +++ b/src/main/java/org/dynmap/WebServer.java @@ -29,8 +29,8 @@ public class WebServer extends Thread { this.server = server; this.debugger = debugger; - String bindAddress = configuration.getString("webserver/bindaddress", "0.0.0.0"); - int port = configuration.getInt("webserver/port", 8123); + String bindAddress = configuration.getString("webserver-bindaddress", "0.0.0.0"); + int port = configuration.getInt("webserver-port", 8123); sock = new ServerSocket(port, 5, bindAddress.equals("0.0.0.0") ? null : InetAddress.getByName(bindAddress)); running = true;