From 01230419259dfd6c7c388978715d6e42a280ff49 Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Thu, 23 Feb 2023 10:54:17 +0100 Subject: [PATCH] Fix webserver only working after plugin reload --- .../java/de/bluecolored/bluemap/common/plugin/Plugin.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/Plugin.java b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/Plugin.java index 3a63688d..ad030648 100644 --- a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/Plugin.java +++ b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/Plugin.java @@ -191,14 +191,13 @@ public class Plugin implements ServerEventListener { ); } - webServer = new WebServer(routingRequestHandler); - webServer.start(); - try { + webServer = new WebServer(routingRequestHandler); webServer.bind(new InetSocketAddress( webserverConfig.resolveIp(), webserverConfig.getPort() )); + webServer.start(); } catch (UnknownHostException ex) { throw new ConfigurationException("BlueMap failed to resolve the ip in your webserver-config.\n" + "Check if that is correctly configured.", ex);