mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-06-03 17:29:43 +00:00
Added support for Mohist servers
This commit is contained in:
@@ -525,6 +525,15 @@ A [Magma](https://magmafoundation.org/) server, which is a combination of Forge
|
|||||||
|
|
||||||
> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
|
> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
|
||||||
|
|
||||||
|
|
||||||
|
## Running a Mohist server
|
||||||
|
|
||||||
|
A [Mohist](https://github.com/Mohist-Community/Mohist) server can be used with
|
||||||
|
|
||||||
|
-e TYPE=MOHIST
|
||||||
|
|
||||||
|
> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
|
||||||
|
|
||||||
## Running a server with a Feed the Beast modpack
|
## Running a server with a Feed the Beast modpack
|
||||||
|
|
||||||
> **NOTE** requires `itzg/minecraft-server:multiarch` image
|
> **NOTE** requires `itzg/minecraft-server:multiarch` image
|
||||||
|
|||||||
@@ -118,6 +118,10 @@ case "${TYPE^^}" in
|
|||||||
exec ${SCRIPTS:-/}start-magma "$@"
|
exec ${SCRIPTS:-/}start-magma "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
MOHIST)
|
||||||
|
exec ${SCRIPTS:-/}start-mohist "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
log "Invalid type: '$TYPE'"
|
log "Invalid type: '$TYPE'"
|
||||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTB, CURSEFORGE, SPONGEVANILLA"
|
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTB, CURSEFORGE, SPONGEVANILLA"
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. ${SCRIPTS:-/}start-utils
|
||||||
|
requireVar VANILLA_VERSION
|
||||||
|
set -o pipefail
|
||||||
|
set -e
|
||||||
|
isDebugging && set -x
|
||||||
|
|
||||||
|
mohistJobs=https://ci.codemc.io/job/Mohist-Community/job/
|
||||||
|
mohistJob=${mohistJobs}Mohist-${VANILLA_VERSION}/
|
||||||
|
|
||||||
|
if ! curl -X HEAD -o /dev/null -fsSL "${mohistJob}"; then
|
||||||
|
log "ERROR: mohist builds do not exist for ${VANILLA_VERSION}"
|
||||||
|
log " check https://ci.codemc.io/job/Mohist-Community/ for available versions"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
latestBuildRelPath=$(
|
||||||
|
curl -fsSL "${mohistJob}lastSuccessfulBuild/api/json" |
|
||||||
|
jq -r '.artifacts[0].relativePath'
|
||||||
|
)
|
||||||
|
|
||||||
|
baseName=$(basename "${latestBuildRelPath}")
|
||||||
|
if [[ ${baseName} != *-server.jar* ]]; then
|
||||||
|
log "ERROR: mohist build for ${VANILLA_VERSION} is not a valid server jar, found ${baseName}"
|
||||||
|
log " check https://ci.codemc.io/job/Mohist-Community/ for available versions"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SERVER="/data/${baseName}"
|
||||||
|
|
||||||
|
if [ ! -f ${SERVER} ]; then
|
||||||
|
log "Downloading ${SERVER}"
|
||||||
|
curl -o "${SERVER}" -fsSL "${mohistJob}lastSuccessfulBuild/artifact/${latestBuildRelPath}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SKIP_LOG4J_CONFIG=true
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec ${SCRIPTS:-/}start-finalSetup01World $@
|
||||||
+8
-1
@@ -99,4 +99,11 @@ function versionLessThan {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
requireVar() {
|
||||||
|
if [ ! -v $1 ]; then
|
||||||
|
log "ERROR: $1 is required to be set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user