From 5ddf67d9e5a007a566bf2795647c90aa1ffa5765 Mon Sep 17 00:00:00 2001 From: muhammadeko Date: Tue, 17 May 2022 07:29:23 +0700 Subject: [PATCH] add config to enable/disable console --- src/main/java/emu/grasscutter/Grasscutter.java | 2 +- src/main/java/emu/grasscutter/utils/ConfigContainer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/emu/grasscutter/Grasscutter.java b/src/main/java/emu/grasscutter/Grasscutter.java index bc5144d97..316c2030e 100644 --- a/src/main/java/emu/grasscutter/Grasscutter.java +++ b/src/main/java/emu/grasscutter/Grasscutter.java @@ -304,7 +304,7 @@ public final class Grasscutter { getLogger().info(translate("messages.status.done")); String input = null; boolean isLastInterrupted = false; - while (true) { + while (config.server.game.enableConsole) { try { input = consoleLineReader.readLine("> "); } catch (UserInterruptException e) { diff --git a/src/main/java/emu/grasscutter/utils/ConfigContainer.java b/src/main/java/emu/grasscutter/utils/ConfigContainer.java index b65fb10db..33f844e34 100644 --- a/src/main/java/emu/grasscutter/utils/ConfigContainer.java +++ b/src/main/java/emu/grasscutter/utils/ConfigContainer.java @@ -136,7 +136,7 @@ public class ConfigContainer { public int bindPort = 22102; /* This is the port used in the default region. */ public int accessPort = 0; - + public boolean enableConsole = true; public GameOptions gameOptions = new GameOptions(); public JoinOptions joinOptions = new JoinOptions(); public ConsoleAccount serverAccount = new ConsoleAccount();