From 849f6468001a9d6a55af6bf065e76b0baf0d5a4b Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Sat, 27 Jul 2024 19:38:27 -0400 Subject: [PATCH] Minecraft Java Server: add user error for 32bit java 21 --- api | 2 +- apps/Minecraft Java Server/install | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/api b/api index 24482b953c..723011a2c4 100755 --- a/api +++ b/api @@ -945,7 +945,7 @@ rm_external_repo() { # remove an external apt repo and its gpg key, if the repo adoptium_installer() { case "$__os_codename" in - bionic | focal | jammy | buster | bullseye | bookworm) + bionic | focal | jammy | noble | buster | bullseye | bookworm) add_external_repo "adoptium" "https://adoptium.jfrog.io/artifactory/api/security/keypair/default-gpg-key/public" "https://adoptium.jfrog.io/artifactory/deb" "$__os_codename" "main" || exit 1 ;; *) diff --git a/apps/Minecraft Java Server/install b/apps/Minecraft Java Server/install index 0e3ba894b6..7d350e5f67 100755 --- a/apps/Minecraft Java Server/install +++ b/apps/Minecraft Java Server/install @@ -147,7 +147,17 @@ fi install_packages lsb-release wget gpg screen || exit 1 case "$java_selection" in - "Java 8"|"Java 17"|"Java 21") + "Java 21") + case "$arch" in + "32") + error "User error: Java 21 is not available for your platform from Adoptium. All 32-bit based architectures are being deprecated and removed by Java. Please use a 64-bit OS. Exiting the script." + ;; + *) + adoptium_installer || exit 1 + ;; + esac + ;; + "Java 8"|"Java 17") adoptium_installer || exit 1 ;; *)