From 664feba139a6b6a332cbf05e3b3d269b5e9650ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Thu, 23 Feb 2023 09:04:46 +0100 Subject: [PATCH 1/3] Add --- launch.cfg | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/launch.cfg b/launch.cfg index 7646c68..c063a80 100644 --- a/launch.cfg +++ b/launch.cfg @@ -33,7 +33,15 @@ mem="6000M" # Overrides # ############# -# Shouldn't be needed, but if for whatever reason you want to override some things, use the below options +# Flags for the server itself +# Usefull fot setting rcon password, server port, etc. +mc_launchoptions="-nogui" + +# If you want to get rid of update notifications, set the below to false +check_for_updates=true + +# The options below are for advanced users, modification is not needed in most cases +# ---------------------------------------------------------------------------------- # If you're purposefully using a different version of Java, you can override the version check java_version_override=false @@ -44,5 +52,3 @@ java_version_override=false override_java_flags=false java_launchoptions="" -# Flags for the server itself -mc_launchoptions="-nogui" From 5575265a000a1869330e64bd9b8fcfc185211307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Thu, 23 Feb 2023 09:05:20 +0100 Subject: [PATCH 2/3] Add `check_for_script_updates` option To be implemented --- launch.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launch.cfg b/launch.cfg index c063a80..80deba7 100644 --- a/launch.cfg +++ b/launch.cfg @@ -37,8 +37,8 @@ mem="6000M" # Usefull fot setting rcon password, server port, etc. mc_launchoptions="-nogui" -# If you want to get rid of update notifications, set the below to false -check_for_updates=true +# If you want to get rid of script updates notifications, set the below to false +check_for_script_updates=true # The options below are for advanced users, modification is not needed in most cases # ---------------------------------------------------------------------------------- From b7edb8b0c73e9d358235a3fa30e73698dfb9c995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Fri, 24 Feb 2023 19:13:24 +0100 Subject: [PATCH 3/3] Add update skip check --- start.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/start.sh b/start.sh index 660d072..1b1e09f 100755 --- a/start.sh +++ b/start.sh @@ -97,6 +97,7 @@ function check_java { # Check if the correct version of java is installed if (( 8 <= minecraft_middle && minecraft_middle <= 11 )); then if ! [[ $java_version -eq 8 ]]; then + echo "Java $java_version is installed." echo "Java 8 is required for Minecraft version $select_version. Please install Java 8." if [[ $java_version == 0 ]]; then exit 3 @@ -105,14 +106,16 @@ function check_java { fi elif (( 12 <= minecraft_middle && minecraft_middle <= 16 )); then if ! [[ $java_version -eq 11 ]]; then + echo "Java $java_version is installed." + echo "Java 11 is required for Minecraft version $select_version. Please install Java 11." if [[ $java_version == 0 ]]; then exit 3 fi - echo "Java 11 is required for Minecraft version $select_version. Please install Java 11." ask_continue fi elif (( minecraft_middle == 17 )); then if ! [[ $java_version -eq 16 ]]; then + echo "Java $java_version is installed." echo "Java 16 is required for Minecraft version $select_version. Please install Java 16." if [[ $java_version == 0 ]]; then exit 3 @@ -121,6 +124,7 @@ function check_java { fi elif (( 18 <= minecraft_middle )); then if ! [[ $java_version -eq 17 ]]; then + echo "Java $java_version is installed." echo "Java 17 is required for Minecraft version $select_version. Please install Java 17." if [[ $java_version == 0 ]]; then exit 3 @@ -476,8 +480,12 @@ function load_config { # Main function function main { - # Check for script updates - check_self_update + if [[ $check_self_update == true ]]; then + # Check for script updates + check_self_update + else + echo "Skipping script update check." + fi # Load config load_config