From 0215c383b02083a8bb1813ee88cebfc2d269dcaf Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+DoctorMacc@users.noreply.github.com> Date: Fri, 27 Nov 2020 18:55:33 -0500 Subject: [PATCH] GUI: Don't exit if there is a config error (#1600) Leave the window open so the user understands there is an error. This also changes the exit code to 1 when exiting without a GUI since we have an error. --- .../platform/standalone/GeyserStandaloneBootstrap.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/GeyserStandaloneBootstrap.java b/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/GeyserStandaloneBootstrap.java index a0a8a3ae..a10b20d9 100644 --- a/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/GeyserStandaloneBootstrap.java +++ b/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/GeyserStandaloneBootstrap.java @@ -204,7 +204,12 @@ public class GeyserStandaloneBootstrap implements GeyserBootstrap { } } catch (IOException ex) { geyserLogger.severe(LanguageUtils.getLocaleStringLog("geyser.config.failed"), ex); - System.exit(0); + if (gui == null) { + System.exit(1); + } else { + // Leave the process running so the GUI is still visible + return; + } } GeyserConfiguration.checkGeyserConfiguration(geyserConfig, geyserLogger);