From 459d3c2699956abf31aa73f25288d1520093ef8f Mon Sep 17 00:00:00 2001 From: Melledy <52122272+Melledy@users.noreply.github.com> Date: Mon, 25 Apr 2022 14:34:37 -0700 Subject: [PATCH] Add getter for DispatchServer's HttpServer --- .../emu/grasscutter/server/dispatch/DispatchServer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java b/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java index 5cb06d5e1..1daa1f6ef 100644 --- a/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java +++ b/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java @@ -43,6 +43,7 @@ public final class DispatchServer { public String regionListBase64; public HashMap regions; + private HttpServer server; public DispatchServer() { this.regions = new HashMap(); @@ -54,6 +55,10 @@ public final class DispatchServer { this.initRegion(); } + public HttpServer getServer() { + return server; + } + public InetSocketAddress getAddress() { return address; } @@ -200,7 +205,6 @@ public final class DispatchServer { } public void start() throws Exception { - HttpServer server; if (Grasscutter.getConfig().getDispatchOptions().UseSSL) { HttpsServer httpsServer = HttpsServer.create(getAddress(), 0); SSLContext sslContext = SSLContext.getInstance("TLS");