From 09b7daa9851776d3d9cfc8deaa4f3a89ca25d7e8 Mon Sep 17 00:00:00 2001 From: TheMode Date: Sun, 8 Aug 2021 19:58:00 +0200 Subject: [PATCH] Fix server shutdown --- src/main/java/net/minestom/server/UpdateManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/minestom/server/UpdateManager.java b/src/main/java/net/minestom/server/UpdateManager.java index 31405290e..ad15174e1 100644 --- a/src/main/java/net/minestom/server/UpdateManager.java +++ b/src/main/java/net/minestom/server/UpdateManager.java @@ -39,13 +39,13 @@ public final class UpdateManager { /** * Should only be created in MinecraftServer. */ - protected UpdateManager() { + UpdateManager() { } /** * Starts the server loop in the update thread. */ - protected void start() { + void start() { final ConnectionManager connectionManager = MinecraftServer.getConnectionManager(); new Thread(() -> { @@ -95,6 +95,7 @@ public final class UpdateManager { MinecraftServer.getExceptionManager().handleException(e); } } + this.threadProvider.shutdown(); }, MinecraftServer.THREAD_NAME_TICK_SCHEDULER).start(); } @@ -241,6 +242,5 @@ public final class UpdateManager { */ public void stop() { this.stopRequested = true; - this.threadProvider.shutdown(); } }