Server not having desired world type fixed

This commit is contained in:
Patrick Kuhs 2025-02-23 13:42:52 +01:00
parent 238bd49a14
commit 705a3d696d
2 changed files with 8 additions and 1 deletions

View File

@ -19,3 +19,4 @@ services:
# Difficulty settings: 0 - peaceful, 1 - easy, 2 - normal, 3 - hard
DIFFICULTY: "easy"
MOTD: "A Dockerized Minecraft Server"
WORLD_TYPE: "default"

View File

@ -90,5 +90,11 @@ if [[ -n $MOTD ]]; then
echo "motd=$MOTD" >> $SERVER_PROPERTIES
fi
if [[ -n $WORLD_TYPE ]]; then
echo "world-type=$WORLD_TYPE" >> $SERVER_PROPERTIES
fi
sleep 1
# Start server
exec java $JAVA_OPTS -jar "server.jar" nogui