File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ set -eo pipefail
44
55: " ${DOWNLOAD_DIR:= ${PWD} / .downloads} "
66: " ${PREVIEW:= false} "
7- : " ${PROCESSED_DOWNLOAD_LINKS_URL := https :// raw.githubusercontent.com / kittizz / bedrock-server-downloads / refs / heads / main / bedrock-server-downloads.json } "
7+ : " ${USE_MINECRAFT_SERVICES := true } "
88: " ${DOWNLOAD_LINKS_URL:= https:// net.web.minecraft-services.net/ api/ v1.0/ download/ links} "
99: " ${DOWNLOAD_SECONDARY_LINKS_URL:= https:// net.web.minecraft-services.net/ api/ v1.0/ download/ links} "
10+ : " ${PROCESSED_DOWNLOAD_LINKS_URL:= https:// raw.githubusercontent.com/ kittizz/ bedrock-server-downloads/ refs/ heads/ main/ bedrock-server-downloads.json} "
1011: " ${RESOLVE_XUID_API_URL:= https:// mcprofile.io/ api/ v1/ bedrock/ gamertag} "
1112: " ${USE_BOX64:= true} "
1213: " ${DEBUG_CURL:= false} "
@@ -82,6 +83,15 @@ function versionFromExisting() {
8283function lookupDownloadUrl() {
8384 platform=${1:? Missing required platform indicator}
8485
86+ if isTrue " $USE_MINECRAFT_SERVICES " ; then
87+ if downloadUrl=$( lookupDownloadUrlFromMinecraftServices " $platform " ) ; then
88+ echo " $downloadUrl "
89+ return 0
90+ else
91+ logWarn " Failed to lookup download URL from Minecraft Services, falling back to processed links"
92+ fi
93+ fi
94+
8595 # Map entry script platform arguments to the tracker's top-level keys
8696 if [[ " $platform " == " serverBedrockPreviewLinux" ]]; then
8797 local type=" preview"
You can’t perform that action at this time.
0 commit comments