Compare commits

...

2 Commits

Author SHA1 Message Date
Geoff Bourne
621962ad9c Always populate ops.txt to allow for additive config
For #283
2019-09-08 17:22:20 -05:00
Aurélien Bertron
5c238af3df Add spawn protection setting (#386) 2019-09-08 16:40:45 -05:00
3 changed files with 11 additions and 3 deletions

View File

@@ -824,6 +824,12 @@ Determines if villagers will be spawned.
docker run -d -e SPAWN_NPCS=true docker run -d -e SPAWN_NPCS=true
### Set spawn protection
Sets the area that non-ops can not edit (0 to disable)
docker run -d -e SPAWN_PROTECTION=0
### View Distance ### View Distance
Sets the amount of world data the server sends the client, measured in chunks in each direction of the player (radius, not diameter). Sets the amount of world data the server sends the client, measured in chunks in each direction of the player (radius, not diameter).
It determines the server-side viewing distance. It determines the server-side viewing distance.

View File

@@ -49,6 +49,7 @@ function customizeServerProps {
setServerProp "spawn-animals" "$SPAWN_ANIMALS" setServerProp "spawn-animals" "$SPAWN_ANIMALS"
setServerProp "spawn-monsters" "$SPAWN_MONSTERS" setServerProp "spawn-monsters" "$SPAWN_MONSTERS"
setServerProp "spawn-npcs" "$SPAWN_NPCS" setServerProp "spawn-npcs" "$SPAWN_NPCS"
setServerProp "spawn-protection" "$SPAWN_PROTECTION"
setServerProp "generate-structures" "$GENERATE_STRUCTURES" setServerProp "generate-structures" "$GENERATE_STRUCTURES"
setServerProp "view-distance" "$VIEW_DISTANCE" setServerProp "view-distance" "$VIEW_DISTANCE"
setServerProp "hardcore" "$HARDCORE" setServerProp "hardcore" "$HARDCORE"

View File

@@ -2,9 +2,10 @@
. /start-utils . /start-utils
if [ -n "$OPS" -a ! -e ops.txt.converted ]; then if [ -n "$OPS" ]; then
echo "Setting ops" echo "Setting/adding ops"
echo $OPS | awk -v RS=, '{print}' >> ops.txt rm -rf ops.txt.converted
echo $OPS | awk -v RS=, '{print}' > ops.txt
fi fi
if [ -n "$WHITELIST" -a ! -e white-list.txt.converted ]; then if [ -n "$WHITELIST" -a ! -e white-list.txt.converted ]; then