From 2125d2b197ef16c9677544f8818975f7049973a4 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Sat, 6 Apr 2024 14:08:54 -0400 Subject: [PATCH] Minecraft Java Server: correct java 21 usage --- apps/Minecraft Java Server/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/Minecraft Java Server/install b/apps/Minecraft Java Server/install index 91554226a7..b3a31a40e9 100755 --- a/apps/Minecraft Java Server/install +++ b/apps/Minecraft Java Server/install @@ -117,14 +117,15 @@ else # we know the version of minecraft in use # choose the appropriate version of java based on that # version <= 1.16.5 java 8 - # version >= 1.17 java 17 + # 1.17 <= version < 1.21 java 17 + # version >= 1.21 java 21 function version { echo "$@" | awk -F. '{ printf("%d%03d%03d\n", $1,$2,$3); }'; } if [ $(version $server_version) -le $(version "1.16.5") ]; then echo "Using Java 8 by default" java_selection="Java 8" elif [ $(version $server_version) -ge $(version "1.21") ]; then - echo "Using Java 17 by default" - java_selection="Java 17" + echo "Using Java 21 by default" + java_selection="Java 21" elif [ $(version $server_version) -ge $(version "1.17") ]; then echo "Using Java 17 by default" java_selection="Java 17"