mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Auto-merging via docker-versions-create
This commit is contained in:
commit
ce1b337f7f
@ -237,12 +237,13 @@ If you're looking for a simple way to deploy this to the Amazon Web Services Clo
|
|||||||
|
|
||||||
## Running a Forge Server
|
## Running a Forge Server
|
||||||
|
|
||||||
Enable Forge server mode by adding a `-e TYPE=FORGE` to your command-line.
|
Enable [Forge server](http://www.minecraftforge.net/wiki/) mode by adding a `-e TYPE=FORGE` to your command-line.
|
||||||
By default the container will run the `RECOMMENDED` version of [Forge server](http://www.minecraftforge.net/wiki/)
|
|
||||||
but you can also choose to run a specific version with `-e FORGEVERSION=10.13.4.1448`.
|
The overall version is specified by `VERSION`, [as described in the section above](#versions) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGEVERSION`, such as `-e FORGEVERSION=14.23.5.2854`.
|
||||||
|
|
||||||
$ docker run -d -v /path/on/host:/data \
|
$ docker run -d -v /path/on/host:/data \
|
||||||
-e TYPE=FORGE -e FORGEVERSION=10.13.4.1448 \
|
-e TYPE=FORGE \
|
||||||
|
-e VERSION=1.12.2 -e FORGEVERSION=14.23.5.2854 \
|
||||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||||
|
|
||||||
To use a pre-downloaded Forge installer, place it in the attached `/data` directory and
|
To use a pre-downloaded Forge installer, place it in the attached `/data` directory and
|
||||||
|
@ -17,8 +17,8 @@ if [[ $PAPER_DOWNLOAD_URL ]]; then
|
|||||||
else
|
else
|
||||||
# PaperMC API v2 docs : https://papermc.io/api/docs/swagger-ui/index.html?configUrl=/api/openapi/swagger-config
|
# PaperMC API v2 docs : https://papermc.io/api/docs/swagger-ui/index.html?configUrl=/api/openapi/swagger-config
|
||||||
|
|
||||||
build=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}" -H "accept: application/json" \
|
build=${PAPERBUILD:=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}" -H "accept: application/json" \
|
||||||
| jq '.builds[-1]')
|
| jq '.builds[-1]')}
|
||||||
case $? in
|
case $? in
|
||||||
0)
|
0)
|
||||||
;;
|
;;
|
||||||
@ -28,7 +28,7 @@ else
|
|||||||
VANILLA_VERSION=$(echo "$versions" | jq -r '.versions[-1]')
|
VANILLA_VERSION=$(echo "$versions" | jq -r '.versions[-1]')
|
||||||
log "WARN: using ${VANILLA_VERSION} since that's the latest provided by PaperMC"
|
log "WARN: using ${VANILLA_VERSION} since that's the latest provided by PaperMC"
|
||||||
# re-execute the current script with the newly computed version
|
# re-execute the current script with the newly computed version
|
||||||
exec $0 "$@"
|
exec "$0" "$@"
|
||||||
fi
|
fi
|
||||||
log "ERROR: ${VANILLA_VERSION} is not published by PaperMC"
|
log "ERROR: ${VANILLA_VERSION} is not published by PaperMC"
|
||||||
log " Set VERSION to one of the following: "
|
log " Set VERSION to one of the following: "
|
||||||
@ -56,6 +56,10 @@ else
|
|||||||
zarg=(-z "$SERVER")
|
zarg=(-z "$SERVER")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
log "Removing old PaperMC versions ..."
|
||||||
|
paperJarSearchString=${SERVER/$build/[0-9]*}
|
||||||
|
find . -name "$paperJarSearchString" ! -name "$SERVER" -delete -print
|
||||||
|
|
||||||
log "Downloading PaperMC $VANILLA_VERSION (build $build) ..."
|
log "Downloading PaperMC $VANILLA_VERSION (build $build) ..."
|
||||||
curl -fsSL -o "$SERVER" "${zarg[@]}" \
|
curl -fsSL -o "$SERVER" "${zarg[@]}" \
|
||||||
"https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}/builds/${build}/downloads/${SERVER}" \
|
"https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}/builds/${build}/downloads/${SERVER}" \
|
||||||
@ -71,4 +75,4 @@ export TYPE=SPIGOT
|
|||||||
export SKIP_LOG4J_CONFIG=true
|
export SKIP_LOG4J_CONFIG=true
|
||||||
|
|
||||||
# Continue to Final Setup
|
# Continue to Final Setup
|
||||||
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
exec ${SCRIPTS:-/}start-finalSetupWorld "$@"
|
||||||
|
@ -146,11 +146,11 @@ JVM_OPTS="-Xms${INIT_MEMORY} -Xmx${MAX_MEMORY} ${JVM_OPTS}"
|
|||||||
function copyFilesForCurseForge() {
|
function copyFilesForCurseForge() {
|
||||||
# copy player modification files unconditionally since their
|
# copy player modification files unconditionally since their
|
||||||
# processing into json is additive anyway
|
# processing into json is additive anyway
|
||||||
[ -f /data/ops.txt ] && cp -f /data/ops.txt ${FTB_DIR}/
|
[ -f /data/ops.txt ] && cp -f /data/ops.txt "${FTB_DIR}/"
|
||||||
[ -f /data/white-list.txt ] && cp -f /data/white-list.txt ${FTB_DIR}/
|
[ -f /data/white-list.txt ] && cp -f /data/white-list.txt "${FTB_DIR}/"
|
||||||
|
|
||||||
if [ ! -e "${FTB_DIR}/server-icon.png" -a -e /data/server-icon.png ]; then
|
if [ ! -e "${FTB_DIR}/server-icon.png" -a -e /data/server-icon.png ]; then
|
||||||
cp -f /data/server-icon.png ${FTB_DIR}/
|
cp -f /data/server-icon.png "${FTB_DIR}/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp -f /data/eula.txt "${FTB_DIR}/"
|
cp -f /data/eula.txt "${FTB_DIR}/"
|
||||||
|
Loading…
Reference in New Issue
Block a user