Skip to content

Commit 6ede7e9

Browse files
Add support for youer and banner (#3484)
1 parent 5416ced commit 6ede7e9

File tree

3 files changed

+40
-11
lines changed

3 files changed

+40
-11
lines changed

docs/types-and-platforms/server-types/hybrids.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,34 @@ By default the latest build will be used; however, a specific build number can b
4949

5050
-e VERSION=1.16.5 -e MOHIST_BUILD=374
5151

52+
### Youer
53+
54+
A [Youer](https://github.com/MohistMC/Youer) server can be used with
55+
56+
-e TYPE=YOUER
57+
58+
!!! note
59+
60+
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
61+
62+
By default the latest build will be used; however, a specific build number can be selected by setting `MOHIST_BUILD`, such as
63+
64+
-e VERSION=1.16.5 -e MOHIST_BUILD=374
65+
66+
### Banner
67+
68+
A [Banner](https://github.com/MohistMC/Banner) server can be used with
69+
70+
-e TYPE=BANNER
71+
72+
!!! note
73+
74+
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
75+
76+
By default the latest build will be used; however, a specific build number can be selected by setting `MOHIST_BUILD`, such as
77+
78+
-e VERSION=1.16.5 -e MOHIST_BUILD=374
79+
5280
### Catserver
5381

5482
A [Catserver](http://catserver.moe/) type server can be used with

scripts/start-configuration

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ if isTrue "${ENABLE_AUTOSTOP}"; then
147147
"${SCRIPTS:-/}start-autostop"
148148
fi
149149

150-
if
150+
if
151151
[[ "$RCON_CMDS_STARTUP" ]] ||
152152
[[ "$RCON_CMDS_ON_CONNECT" ]] ||
153-
[[ "$RCON_CMDS_ON_DISCONNECT" ]] ||
154-
[[ "$RCON_CMDS_FIRST_CONNECT" ]] ||
153+
[[ "$RCON_CMDS_ON_DISCONNECT" ]] ||
154+
[[ "$RCON_CMDS_FIRST_CONNECT" ]] ||
155155
[[ "$RCON_CMDS_LAST_DISCONNECT" ]]
156156
then
157157
log "Starting RCON commands"
@@ -250,7 +250,7 @@ case "${TYPE^^}" in
250250
exec "${SCRIPTS:-/}start-deployKetting" "$@"
251251
;;
252252

253-
MOHIST)
253+
MOHIST|YOUER|BANNER)
254254
exec "${SCRIPTS:-/}start-deployMohist" "$@"
255255
;;
256256

@@ -286,7 +286,7 @@ case "${TYPE^^}" in
286286
logError "Invalid TYPE: '$TYPE'"
287287
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
288288
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,"
289-
logError " CANYON, LIMBO, CRUCIBLE, LEAF"
289+
logError " CANYON, LIMBO, CRUCIBLE, LEAF, YOUER, BANNER"
290290
exit 1
291291
;;
292292

scripts/start-deployMohist

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ resolveVersion
1010
: "${MOHIST_BUILD:=lastSuccessfulBuild}"
1111

1212
# Docs at https://mohistmc.com/mohistmc-api
13-
mohistApiUrl="https://api.mohistmc.com/project/mohist"
14-
mohistDownloadsPage="https://mohistmc.com/downloadSoftware?project=mohist"
13+
mohistType="${TYPE,,}"
14+
mohistApiUrl="https://api.mohistmc.com/project/${mohistType}"
15+
mohistDownloadsPage="https://mohistmc.com/downloadSoftware?project=${mohistType}"
1516

1617
if ! get --exists "${mohistApiUrl}/${VERSION}/builds"; then
17-
logError "Mohist builds do not exist for ${VERSION}"
18+
logError "${mohistType} builds do not exist for ${VERSION}"
1819
logError " check ${mohistDownloadsPage} for available versions"
1920
logError " and set VERSION accordingly"
2021
exit 1
@@ -25,7 +26,7 @@ if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then
2526
if ! buildNumber=$(
2627
get --json-path '$[0].id' "${mohistApiUrl}/${VERSION}/builds"
2728
); then
28-
logError "failed to list Mohist builds for ${VERSION}"
29+
logError "failed to list ${mohistType} builds for ${VERSION}"
2930
exit 1
3031
fi
3132
MOHIST_BUILD="${buildNumber}"
@@ -40,10 +41,10 @@ if [[ -z "${downloadUrl}" ]]; then
4041
exit 1
4142
fi
4243

43-
SERVER="/data/mohist-${VERSION}-${MOHIST_BUILD}-server.jar"
44+
SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar"
4445

4546
if [ ! -f "${SERVER}" ]; then
46-
log "Downloading Mohist build ${MOHIST_BUILD} for ${VERSION}"
47+
log "Downloading ${mohistType^} build ${MOHIST_BUILD} for ${VERSION}"
4748
get -o "${SERVER}" "${downloadUrl}"
4849
fi
4950

0 commit comments

Comments
 (0)