From ee21224fff6c5247a986b2a544ec86f06a3b3bc7 Mon Sep 17 00:00:00 2001 From: noeppi_noeppi <63002502+noeppi-noeppi@users.noreply.github.com> Date: Fri, 17 Sep 2021 01:52:55 +0200 Subject: [PATCH] Propagate all arguments passed to the server start scripts to the game (#8060) --- server_files/run.bat | 7 ++++--- server_files/run.sh | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server_files/run.bat b/server_files/run.bat index 4c51bfb6ad..de9ae480d6 100644 --- a/server_files/run.bat +++ b/server_files/run.bat @@ -1,5 +1,6 @@ REM Forge requires a configured set of both JVM and program arguments. REM Add custom JVM arguments to the user_jvm_args.txt -REM Add custom program arguments {such as nogui} to this file at the end of the next line -java @user_jvm_args.txt @libraries/@MAVEN_PATH@/win_args.txt -pause \ No newline at end of file +REM Add custom program arguments {such as nogui} to this file in the next line before the %* or +REM pass them to this script directly +java @user_jvm_args.txt @libraries/@MAVEN_PATH@/win_args.txt %* +pause diff --git a/server_files/run.sh b/server_files/run.sh index 348b0e08bc..64f6f9a7cd 100644 --- a/server_files/run.sh +++ b/server_files/run.sh @@ -1,5 +1,6 @@ #!/usr/bin/env sh # Forge requires a configured set of both JVM and program arguments. # Add custom JVM arguments to the user_jvm_args.txt -# Add custom program arguments {such as nogui} to this file at the end of the next line -java @user_jvm_args.txt @libraries/@MAVEN_PATH@/unix_args.txt \ No newline at end of file +# Add custom program arguments {such as nogui} to this file in the next line before the "$@" or +# pass them to this script directly +java @user_jvm_args.txt @libraries/@MAVEN_PATH@/unix_args.txt "$@"