This commit is contained in:
kento2 2026-08-05 21:40:52 +02:00
parent c60f19cafc
commit 2ea2eb5d1e
114 changed files with 671 additions and 609 deletions

42
runDevServer.sh Executable file
View file

@ -0,0 +1,42 @@
#!/usr/bin/env sh
set -e
test -n "$MC_VERSION" || {
>&2 echo "MC_VERSION unset"
exit 1
}
test -n "$BUILT_PLUGIN" || {
>&2 echo "BUILT_PLUGIN unset"
exit 1
}
BUILT_PLUGIN="$(realpath "$BUILD_WORKSPACE_DIRECTORY/$BUILT_PLUGIN")"
test -e "$BUILT_PLUGIN" || {
>&2 echo "$BUILT_PLUGIN does not exist"
exit 1
}
mkdir -p "$BUILD_WORKSPACE_DIRECTORY/run"
cd "$BUILD_WORKSPACE_DIRECTORY/run"
printf 'eula=true' > eula.txt
server="paper-${MC_VERSION}.jar"
test -f "$server" || {
>&2 echo "$server not found. downloading..."
url="$(curl -Ls "https://fill.papermc.io/v3/projects/paper/versions/$MC_VERSION/builds/latest" \
| jq -r '.downloads."server:default".url')"
curl -L -o "$server" "$url"
}
# shellcheck disable=SC2068
for arg in $@; do
name="$(echo "$arg" | cut -d= -f1)"
url="$(echo "$arg" | cut -d= -f2)"
plugin="plugins/$name"
test -f "$plugin" || curl -Lo "$plugin" "$url"
done
exec java -jar "$server" \
--nogui \
--add-plugin "$BUILT_PLUGIN"