mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Add environment variable to disable server gui
This commit is contained in:
parent
f283a61ad3
commit
64365b4218
@ -205,7 +205,7 @@
|
||||
worlddimensions = dedicatedserverproperties.createDimensions(worldloader_a.datapackWorldgen());
|
||||
}
|
||||
|
||||
@@ -225,32 +296,44 @@
|
||||
@@ -225,32 +296,45 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@ -238,6 +238,7 @@
|
||||
+ */
|
||||
+ 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()) {
|
||||
dedicatedserver1.showGui();
|
||||
}
|
||||
@ -255,7 +256,7 @@
|
||||
Thread thread = new Thread("Server Shutdown Thread") {
|
||||
public void run() {
|
||||
dedicatedserver.halt(true);
|
||||
@@ -259,6 +342,7 @@
|
||||
@@ -259,6 +343,7 @@
|
||||
|
||||
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(Main.LOGGER));
|
||||
Runtime.getRuntime().addShutdownHook(thread);
|
||||
@ -263,7 +264,7 @@
|
||||
} catch (Exception 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user