Skip to content

Commit 22be5de

Browse files
Update install.sh
1 parent 032e4a0 commit 22be5de

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

install.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,19 @@ fi
1818

1919
mkdir plugins
2020
curl -o ./plugins/viaversion.jar https://hangarcdn.papermc.io/plugins/ViaVersion/ViaVersion/versions/5.4.1/PAPER/ViaVersion-5.4.1.jar
21+
22+
PROJECT="floodgate"
23+
VERSION="2.2.4"
24+
25+
LATEST_BUILD=$(curl -s https://download.geysermc.org/v2/projects/${PROJECT}/versions/${VERSION}/builds | \
26+
jq -r '.builds | map(select(.channel == "default") | .build) | .[-1]')
27+
28+
if [ "$LATEST_BUILD" != "null" ]; then
29+
FILE_NAME=spigot
30+
DOWNLOAD_URL="https://download.geysermc.org/v2/projects/${PROJECT}/versions/${VERSION}/builds/${LATEST_BUILD}/downloads/${FILE_NAME}"
31+
32+
curl -o ./plugins/floodgate.jar $DOWNLOAD_URL
33+
echo "Download completed $DOWNLOAD_URL"
34+
else
35+
echo "No stable build for version $VERSION found :("
36+
fi

0 commit comments

Comments
 (0)