Allow specify paper build and don't use legacy gamemode and difficulty (#503)

This commit is contained in:
orblazer
2020-04-22 14:06:57 +02:00
committed by GitHub
parent e9b1332119
commit c2846fc586
3 changed files with 60 additions and 25 deletions

View File

@@ -2,10 +2,12 @@
. /start-utils
export SERVER=paper_server-${VANILLA_VERSION}.jar
PAPERBUILD=${PAPERBUILD:-LATEST}
export SERVER=paper_server-${VANILLA_VERSION}-${PAPERBUILD}.jar
if [ ! -f "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
downloadUrl=${PAPER_DOWNLOAD_URL:-https://papermc.io/api/v1/paper/${VANILLA_VERSION}/latest/download}
log "Downloading Paper $VANILLA_VERSION from $downloadUrl ..."
downloadUrl=${PAPER_DOWNLOAD_URL:-https://papermc.io/api/v1/paper/${VANILLA_VERSION}/${PAPERBUILD}/download}
log "Downloading Paper $VANILLA_VERSION (build $PAPERBUILD) from $downloadUrl ..."
curl -fsSL -o "$SERVER" "$downloadUrl"
if [ ! -f "$SERVER" ]; then
log "ERROR: failed to download from $downloadUrl (status=$?)"