mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 14:24:28 +00:00
mc: added allow-flight option
This commit is contained in:
parent
2627317e03
commit
959bdeef54
2 changed files with 12 additions and 0 deletions
|
@ -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 a new issue