From 615476fe534e2344b82f3fd74c64d26bea70a005 Mon Sep 17 00:00:00 2001 From: off-by-0point5 <61155885+off-by-0point5@users.noreply.github.com> Date: Mon, 17 Jan 2022 16:45:42 +0100 Subject: [PATCH] Fix MinecaftServer.terminalEnabled not being used for terminal (de)activation (#591) --- src/main/java/net/minestom/server/ServerProcessImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/ServerProcessImpl.java b/src/main/java/net/minestom/server/ServerProcessImpl.java index a0c305978..0491f06aa 100644 --- a/src/main/java/net/minestom/server/ServerProcessImpl.java +++ b/src/main/java/net/minestom/server/ServerProcessImpl.java @@ -68,7 +68,6 @@ final class ServerProcessImpl implements ServerProcess { private final ThreadDispatcher dispatcher; private final Ticker ticker; - private boolean terminalEnabled = System.getProperty("minestom.terminal.disabled") == null; private final AtomicBoolean started = new AtomicBoolean(); private final AtomicBoolean stopped = new AtomicBoolean(); @@ -242,7 +241,7 @@ final class ServerProcessImpl implements ServerProcess { LOGGER.info("Minestom server started successfully."); - if (terminalEnabled) { + if (MinecraftServer.isTerminalEnabled()) { MinestomTerminal.start(); } // Stop the server on SIGINT