mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 05:05:16 +01:00
added configvariable bindaddress (thanks FrozenCow)
This commit is contained in:
parent
8162817041
commit
b4fca31cd5
@ -90,6 +90,9 @@ public class MapManager extends Thread {
|
|||||||
/* port to run web server on */
|
/* port to run web server on */
|
||||||
public int serverport = 8123;
|
public int serverport = 8123;
|
||||||
|
|
||||||
|
/* bind web server to ip-address */
|
||||||
|
public String bindaddress = "0.0.0.0";
|
||||||
|
|
||||||
/* time to pause between rendering tiles (ms) */
|
/* time to pause between rendering tiles (ms) */
|
||||||
public int renderWait = 500;
|
public int renderWait = 500;
|
||||||
|
|
||||||
@ -125,6 +128,7 @@ public class MapManager extends Thread {
|
|||||||
colorsetpath = "colors.txt";
|
colorsetpath = "colors.txt";
|
||||||
signspath = "signs.txt";
|
signspath = "signs.txt";
|
||||||
serverport = 8123;
|
serverport = 8123;
|
||||||
|
bindaddress = "0.0.0.0";
|
||||||
|
|
||||||
tileStore = new HashMap<Long, MapTile>();
|
tileStore = new HashMap<Long, MapTile>();
|
||||||
staleTiles = new LinkedList<MapTile>();
|
staleTiles = new LinkedList<MapTile>();
|
||||||
|
@ -20,7 +20,7 @@ public class WebServer extends Thread {
|
|||||||
public WebServer(int port, MapManager mgr) throws IOException
|
public WebServer(int port, MapManager mgr) throws IOException
|
||||||
{
|
{
|
||||||
this.mgr = mgr;
|
this.mgr = mgr;
|
||||||
sock = new ServerSocket(port, 5, InetAddress.getByName("127.0.0.1"));
|
sock = new ServerSocket(port, 5, mgr.bindaddress.equals("0.0.0.0") ? null : InetAddress.getByName(mgr.bindaddress));
|
||||||
running = true;
|
running = true;
|
||||||
start();
|
start();
|
||||||
log.info("map WebServer started on port " + port);
|
log.info("map WebServer started on port " + port);
|
||||||
|
Loading…
Reference in New Issue
Block a user