diff --git a/docs/misc/downloads-api.mdx b/docs/misc/downloads-api.mdx index 042af0293..e909bd54f 100644 --- a/docs/misc/downloads-api.mdx +++ b/docs/misc/downloads-api.mdx @@ -47,15 +47,15 @@ This will get the latest stable build for the given project and Minecraft versio PROJECT="paper" MINECRAFT_VERSION="%%_MAJ_MIN_MC_%%" -LATEST_VERSION=$(curl -s https://api.papermc.io/v2/projects/paper | \ +LATEST_VERSION=$(curl -s https://api.papermc.io/v2/projects/${PROJECT} | \ jq -r '.versions[-1]') LATEST_BUILD=$(curl -s https://api.papermc.io/v2/projects/${PROJECT}/versions/${MINECRAFT_VERSION}/builds | \ jq -r '.builds | map(select(.channel == "default") | .build) | .[-1]') -JAR_NAME=paper-${LATEST_VERSION}-${LATEST_BUILD}.jar +JAR_NAME=${PROJECT}-${LATEST_VERSION}-${LATEST_BUILD}.jar -PAPERMC_URL="https://api.papermc.io/v2/projects/paper/versions/${LATEST_VERSION}/builds/${LATEST_BUILD}/downloads/${JAR_NAME}" +PAPERMC_URL="https://api.papermc.io/v2/projects/${PROJECT}/versions/${LATEST_VERSION}/builds/${LATEST_BUILD}/downloads/${JAR_NAME}" # Download the latest PaperMC version curl -o server.jar $PAPERMC_URL