mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
mc: added allow-flight option
This commit is contained in:
parent
2627317e03
commit
959bdeef54
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user