Compare commits

...
8 changed files with 37 additions and 13 deletions

No files matched your search

-11
View File
@@ -53,17 +53,6 @@ if [[ "$AUTOPAUSE_KNOCK_INTERFACE" == "lo" ]] ; then
logWarning " Continuing with this setting."
fi
if [[ -n "$MAX_TICK_TIME" && "$MAX_TICK_TIME" != "-1" ]] ; then
logWarning "MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
elif [[ -z "$MAX_TICK_TIME" ]] ; then
MAX_TICK_TIME=-1
if versionLessThan 1.8.1; then
# 10 years
MAX_TICK_TIME=315360000000
fi
export MAX_TICK_TIME
fi
# seq_cooldown cannot be larger than AUTOPAUSE_TIMEOUT_KN, otherwise the server may
# become paused while knockd is still ignoring packets, preventing players from joining.
let COOLDOWN=$AUTOPAUSE_TIMEOUT_KN/2
+11
View File
@@ -207,6 +207,17 @@ if isTrue "${VERSION_FROM_MODRINTH_PROJECTS:-}" && [[ ${MODRINTH_PROJECTS:-} ]];
fi
if isTrue "${ENABLE_AUTOPAUSE}"; then
if [[ -n "${MAX_TICK_TIME:-}" && "$MAX_TICK_TIME" != "-1" ]] ; then
logWarning "MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
elif [[ -z "${MAX_TICK_TIME:-}" ]] ; then
MAX_TICK_TIME=-1
if versionLessThan 1.8.1; then
# 10 years
MAX_TICK_TIME=315360000000
fi
export MAX_TICK_TIME
fi
# Keep the default in this process so it reaches server.properties setup.
"$(dirname "$0")/start-autopause"
elif isTrue "${ENABLE_AUTOSTOP}"; then
"$(dirname "$0")/start-autostop"
+8 -2
View File
@@ -127,8 +127,14 @@ if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] );
if [ "$FAMILY" = "SPIGOT" ]; then
# Reorganise if a Spigot server
log "Moving End and Nether maps to Spigot location"
[ -d "$worldDest/DIM1" ] && mv -f "$worldDest/DIM1" "${worldDest}_the_end"
[ -d "$worldDest/DIM-1" ] && mv -f "$worldDest/DIM-1" "${worldDest}_nether"
if [ -d "$worldDest/DIM1" ]; then
mkdir -p "${worldDest}_the_end"
mv -f "$worldDest/DIM1" "${worldDest}_the_end/"
fi
if [ -d "$worldDest/DIM-1" ]; then
mkdir -p "${worldDest}_nether"
mv -f "$worldDest/DIM-1" "${worldDest}_nether/"
fi
fi
fi
@@ -0,0 +1,15 @@
services:
mc:
restart: "no"
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
environment:
EULA: "TRUE"
SETUP_ONLY: "TRUE"
TYPE: "PAPER"
WORLD: /worlds/world
# the following are only used to speed up test execution
VERSION: 1.18.1
PAPER_CUSTOM_JAR: /servers/fake.jar
volumes:
- ./worlds:/worlds:ro
- ./data:/data
@@ -0,0 +1,3 @@
mc-image-helper assert fileExists world/level.dat && \
mc-image-helper assert fileExists world_nether/DIM-1/some_nether_file && \
mc-image-helper assert fileExists world_the_end/DIM1/some_end_file