Skip to content

Commit b54cc67

Browse files
Update to api.papermc.io (#220)
1 parent 88daf8c commit b54cc67

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

scripts/run-bungeecord.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,29 +237,29 @@ function getFromPaperMc() {
237237
local version=${2?}
238238
local buildId=${3?}
239239

240-
# Doc : https://papermc.io/api
240+
# Doc : https://api.papermc.io/
241241

242242
if [[ ${version^^} = LATEST ]]; then
243-
if ! version=$(get --json-path=".versions[-1]" "https://papermc.io/api/v2/projects/${project}"); then
243+
if ! version=$(get --json-path=".versions[-1]" "https://api.papermc.io/v2/projects/${project}"); then
244244
echo "ERROR: failed to lookup PaperMC versions"
245245
exit 1
246246
fi
247247
fi
248248

249249
if [[ ${buildId^^} = LATEST ]]; then
250-
if ! buildId=$(get --json-path=".builds[-1]" "https://papermc.io/api/v2/projects/${project}/versions/${version}"); then
250+
if ! buildId=$(get --json-path=".builds[-1]" "https://api.papermc.io/v2/projects/${project}/versions/${version}"); then
251251
echo "ERROR: failed to lookup PaperMC build from version ${version}"
252252
exit 1
253253
fi
254254
fi
255255

256256

257-
if ! jar=$(get --json-path=".downloads.application.name" "https://papermc.io/api/v2/projects/${project}/versions/${version}/builds/${buildId}"); then
257+
if ! jar=$(get --json-path=".downloads.application.name" "https://api.papermc.io/v2/projects/${project}/versions/${version}/builds/${buildId}"); then
258258
echo "ERROR: failed to lookup PaperMC download file from version=${version} build=${buildId}"
259259
exit 1
260260
fi
261261

262-
BUNGEE_JAR_URL="https://papermc.io/api/v2/projects/${project}/versions/${version}/builds/${buildId}/downloads/${jar}"
262+
BUNGEE_JAR_URL="https://api.papermc.io/v2/projects/${project}/versions/${version}/builds/${buildId}/downloads/${jar}"
263263
BUNGEE_JAR=$BUNGEE_HOME/${BUNGEE_JAR:=${project}-${version}-${buildId}.jar}
264264
}
265265

0 commit comments

Comments
 (0)