mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-07-15 21:14:54 +00:00
@@ -2,43 +2,13 @@
|
|||||||
|
|
||||||
export SERVER=paper_server.jar
|
export SERVER=paper_server.jar
|
||||||
if [ ! -f $SERVER ]; then
|
if [ ! -f $SERVER ]; then
|
||||||
job=Paper
|
downloadUrl=${PAPER_DOWNLOAD_URL:-https://papermc.io/api/v1/paper/${VERSION}/latest/download}
|
||||||
paperJar=paperclip.jar
|
echo "Downloading Paper $VERSION from $downloadUrl ..."
|
||||||
case "${VANILLA_VERSION}" in
|
|
||||||
1.13.*)
|
|
||||||
job=Paper-1.13
|
|
||||||
build="lastSuccessfulBuild"
|
|
||||||
;;
|
|
||||||
1.12.2)
|
|
||||||
build="lastSuccessfulBuild";;
|
|
||||||
1.11.2)
|
|
||||||
build="1104";;
|
|
||||||
1.10.2)
|
|
||||||
build="916";;
|
|
||||||
1.9.4)
|
|
||||||
build="773";;
|
|
||||||
1.8.8)
|
|
||||||
paperJar=Paperclip.jar
|
|
||||||
build="443";;
|
|
||||||
*)
|
|
||||||
build="nosupp";;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ $build != "nosupp" ]; then
|
|
||||||
rm -f $SERVER
|
|
||||||
downloadUrl=${PAPER_DOWNLOAD_URL:-https://papermc.io/ci/job/$job/$build/artifact/${paperJar}}
|
|
||||||
echo "Downloading Paper $VANILLA_VERSION from $downloadUrl ..."
|
|
||||||
curl -fsSL -o $SERVER "$downloadUrl"
|
curl -fsSL -o $SERVER "$downloadUrl"
|
||||||
if [ ! -f $SERVER ]; then
|
if [ ! -f $SERVER ]; then
|
||||||
echo "ERROR: failed to download from $downloadUrl (status=$?)"
|
echo "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "ERROR: Version $VERSION is not supported for $TYPE"
|
|
||||||
echo " Refer to https://papermc.io/ci/"
|
|
||||||
echo " for supported versions"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Normalize on Spigot for operations below
|
# Normalize on Spigot for operations below
|
||||||
|
|||||||
Reference in New Issue
Block a user