diff --git a/minecraft-server/README.md b/minecraft-server/README.md index 5fe782a5..00da6cd6 100644 --- a/minecraft-server/README.md +++ b/minecraft-server/README.md @@ -723,6 +723,12 @@ By default, server checks connecting players against Minecraft's account databas docker run -d -e ONLINE_MODE=FALSE ... +### Allow flight + +Allows users to use flight on your server while in Survival mode, if they have a mod that provides flight installed. + + -e ALLOW_FLIGHT=TRUE|FALSE + ## Miscellaneous Options ### Memory Limit diff --git a/minecraft-server/start-finalSetup04ServerProperties b/minecraft-server/start-finalSetup04ServerProperties index cf417a2e..96203cb1 100755 --- a/minecraft-server/start-finalSetup04ServerProperties +++ b/minecraft-server/start-finalSetup04ServerProperties @@ -5,6 +5,11 @@ function setServerProp { local prop=$1 local var=$2 if [ -n "$var" ]; then + # normalize booleans + case ${var^^} in + TRUE|FALSE) + var=${var,,} ;; + esac echo "Setting ${prop} to '${var}' in ${SERVER_PROPERTIES}" sed -i "/^${prop}\s*=/ c ${prop}=${var}" $SERVER_PROPERTIES else @@ -55,6 +60,7 @@ if [ ! -e $SERVER_PROPERTIES ]; then setServerProp "pvp" "$PVP" setServerProp "generator-settings" "$GENERATOR_SETTINGS" setServerProp "online-mode" "$ONLINE_MODE" + setServerProp "allow-flight" "$ALLOW_FLIGHT" if [ -n "$LEVEL_TYPE" ]; then # normalize to uppercase