Fix MinecaftServer.terminalEnabled not being used for terminal (de)activation (#591)

This commit is contained in:
off-by-0point5 2022-01-17 16:45:42 +01:00 committed by GitHub
parent e979d71dee
commit 615476fe53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,6 @@ final class ServerProcessImpl implements ServerProcess {
private final ThreadDispatcher<Chunk> 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