diff --git a/apps/Minecraft Java Server/install b/apps/Minecraft Java Server/install index b3a31a40e9..6ee2f2c7d7 100755 --- a/apps/Minecraft Java Server/install +++ b/apps/Minecraft Java Server/install @@ -77,14 +77,15 @@ case "$server_category" in wget -O "$server_jar" "https://api.purpurmc.org/v2/purpur/$server_version/$build_version/download" || exit 1 ;; "Vanilla") - available_versions=$(curl -s https://serverjars.com/api/fetchAll/Vanilla/$server_category/0 | jq -r '.response[] | .version') + available_versions=$(curl -s https://piston-meta.mojang.com/mc/game/version_manifest_v2.json | jq -r '.versions.[] | select ( .type == "release" ) | .id') description="What version of $server_category do you want to run?" table=($available_versions) userinput_func "$description" "${table[@]}" server_version="$output" status "Selected $server_category version $server_version" - server_jar="${server_category,,}-$server_version.jar" - wget -O "$server_jar" "https://serverjars.com/api/fetchJar/Vanilla/$server_category/$server_version" || exit 1 + version_json="$(curl -s https://piston-meta.mojang.com/mc/game/version_manifest_v2.json | jq -r '.versions.[] | select ( .id == "'$server_version'" ) | .url')" + server_jar="minecraft_server.$server_version.jar" + wget -O "$server_jar" "$(curl -s "$version_json" | jq -r '.downloads.server.url')" || exit 1 ;; *) error "You did not choose an option, exiting the script."