13
0
geforkt von Mirrors/Paper

Add environment variable to disable server gui

Dieser Commit ist enthalten in:
Riley Park 2021-05-17 00:34:55 -07:00
Ursprung f283a61ad3
Commit 64365b4218

Datei anzeigen

@ -205,7 +205,7 @@
worlddimensions = dedicatedserverproperties.createDimensions(worldloader_a.datapackWorldgen()); worlddimensions = dedicatedserverproperties.createDimensions(worldloader_a.datapackWorldgen());
} }
@@ -225,32 +296,44 @@ @@ -225,32 +296,45 @@
return; return;
} }
@ -238,6 +238,7 @@
+ */ + */
+ boolean flag2 = !optionset.has("nogui") && !optionset.nonOptionArguments().contains("nogui"); + boolean flag2 = !optionset.has("nogui") && !optionset.nonOptionArguments().contains("nogui");
+ if(!Boolean.parseBoolean(System.getenv().getOrDefault("PAPER_DISABLE_SERVER_GUI", String.valueOf(false)))) // Paper - Add environment variable to disable server gui
if (flag2 && !GraphicsEnvironment.isHeadless()) { if (flag2 && !GraphicsEnvironment.isHeadless()) {
dedicatedserver1.showGui(); dedicatedserver1.showGui();
} }
@ -255,7 +256,7 @@
Thread thread = new Thread("Server Shutdown Thread") { Thread thread = new Thread("Server Shutdown Thread") {
public void run() { public void run() {
dedicatedserver.halt(true); dedicatedserver.halt(true);
@@ -259,6 +342,7 @@ @@ -259,6 +343,7 @@
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(Main.LOGGER)); thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(Main.LOGGER));
Runtime.getRuntime().addShutdownHook(thread); Runtime.getRuntime().addShutdownHook(thread);
@ -263,7 +264,7 @@
} catch (Exception exception1) { } catch (Exception exception1) {
Main.LOGGER.error(LogUtils.FATAL_MARKER, "Failed to start the minecraft server", exception1); Main.LOGGER.error(LogUtils.FATAL_MARKER, "Failed to start the minecraft server", exception1);
} }
@@ -295,7 +379,7 @@ @@ -295,7 +380,7 @@
} }
public static void forceUpgrade(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, boolean eraseCache, BooleanSupplier continueCheck, RegistryAccess dynamicRegistryManager, boolean recreateRegionFiles) { public static void forceUpgrade(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, boolean eraseCache, BooleanSupplier continueCheck, RegistryAccess dynamicRegistryManager, boolean recreateRegionFiles) {