mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
32 lines
880 B
Plaintext
32 lines
880 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
# shellcheck source=start-utils
|
||
|
. "${SCRIPTS:-/}start-utils"
|
||
|
isDebugging && set -x
|
||
|
|
||
|
: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}"
|
||
|
: "${KETTING_VERSION:=}"
|
||
|
: "${KETTING_TAG:=${KETTING_VERSION:0:7}}"
|
||
|
|
||
|
resolveVersion
|
||
|
|
||
|
if ! downloadUrl="https://github.com/kettingpowered/Ketting-1-20-x/releases/download/${KETTING_TAG}/ketting-${VERSION}-${FORGE_VERSION}-${KETTING_VERSION}-server.jar"; then
|
||
|
log "ERROR failed to locate latest Ketting download for ${VERSION}. Is that version supported?"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if [[ $downloadUrl == null ]]; then
|
||
|
log "ERROR Ketting does not seem to be available for $VERSION"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
|
||
|
log "ERROR: failed to download Ketting server jar from $downloadUrl"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
export SERVER
|
||
|
export FAMILY=HYBRID
|
||
|
|
||
|
exec "${SCRIPTS:-/}start-spiget" "$@"
|