Changed configuration to key/value instead of full YAML.

This commit is contained in:
FrozenCow 2011-01-18 20:08:05 +01:00
parent 9b8a90bf9f
commit b27fcdbd4b
2 changed files with 17 additions and 14 deletions

View file

@ -1,13 +1,16 @@
renderinterval: 30 # How often a tile gets rendered (in seconds). # All paths in this configuration file are relative to Dynmap's data-folder: minecraft_server/plugins/dynmap/
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.
webserver: # How often a tile gets rendered (in seconds).
address: 0.0.0.0 # The interface the webserver will bind to (0.0.0.0 is all interfaces). renderinterval: 1
port: 8123 # The port the webserver will listen on.
maps: # The path where the tile-files are placed.
org.dynmap.kzedmap.KzedMap: tilepath: web/tiles
colorpath: [JAR]
renderers: # The path where the web-files are located.
org.dynmap.kzedmap.DefaultTileRenderer: { prefix: t } webpath: web
org.dynmap.kzedmap.CaveTileRenderer: { prefix: ct }
# 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

View file

@ -29,8 +29,8 @@ public class WebServer extends Thread {
this.server = server; this.server = server;
this.debugger = debugger; this.debugger = debugger;
String bindAddress = configuration.getString("webserver/bindaddress", "0.0.0.0"); String bindAddress = configuration.getString("webserver-bindaddress", "0.0.0.0");
int port = configuration.getInt("webserver/port", 8123); int port = configuration.getInt("webserver-port", 8123);
sock = new ServerSocket(port, 5, bindAddress.equals("0.0.0.0") ? null : InetAddress.getByName(bindAddress)); sock = new ServerSocket(port, 5, bindAddress.equals("0.0.0.0") ? null : InetAddress.getByName(bindAddress));
running = true; running = true;