From f1c9417237daab2ef568b8c47b16e5976f588ad5 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sun, 8 Sep 2013 00:00:25 -0500 Subject: [PATCH] Add support for web server bindaddress to be set to match MC server-ip setting --- src/main/java/org/dynmap/bukkit/DynmapPlugin.java | 6 ++++++ src/main/resources/configuration.txt | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/dynmap/bukkit/DynmapPlugin.java b/src/main/java/org/dynmap/bukkit/DynmapPlugin.java index 03d8c6fa..05014edd 100644 --- a/src/main/java/org/dynmap/bukkit/DynmapPlugin.java +++ b/src/main/java/org/dynmap/bukkit/DynmapPlugin.java @@ -16,6 +16,7 @@ import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Chunk; import org.bukkit.ChunkSnapshot; @@ -551,6 +552,11 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI { public double getServerTPS() { return tps; } + + @Override + public String getServerIP() { + return Bukkit.getServer().getIp(); + } } /** * Player access abstraction class diff --git a/src/main/resources/configuration.txt b/src/main/resources/configuration.txt index 8d651795..68fbbe23 100644 --- a/src/main/resources/configuration.txt +++ b/src/main/resources/configuration.txt @@ -282,7 +282,8 @@ tilespath: web/tiles 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 +# If not set, uses same setting as server in server.properties (or 0.0.0.0 if not specified) +#webserver-bindaddress: 0.0.0.0 # The TCP-port the webserver will listen on. webserver-port: 8123