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).
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 }
# 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

View file

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