misc: code cleanup in start-setupServerProperties

This commit is contained in:
Geoff Bourne 2021-11-12 21:20:53 -06:00
parent 721df8d32b
commit a8a60264e9

View File

@ -105,11 +105,11 @@ function customizeServerProps {
setServerProp "use-native-transport" USE_NATIVE_TRANSPORT
setServerProp "enforce-whitelist" ENFORCE_WHITELIST
setServerProp "simulation-distance" SIMULATION_DISTANCE
[[ $MOTD ]] && setServerPropValue "motd" "$(echo $MOTD | mc-image-helper asciify)"
setServerPropValue "motd" "$(echo "$MOTD" | mc-image-helper asciify)"
[[ $LEVEL_TYPE ]] && setServerPropValue "level-type" "${LEVEL_TYPE^^}"
if [ -n "$DIFFICULTY" ]; then
case $DIFFICULTY in
case ${DIFFICULTY,,} in
peaceful|0)
if versionLessThan 1.13; then
DIFFICULTY=0
@ -148,8 +148,7 @@ function customizeServerProps {
if [ -n "$MODE" ]; then
log "Setting mode"
MODE_LC=$( echo $MODE | tr '[:upper:]' '[:lower:]' )
case $MODE_LC in
case ${MODE,,} in
su*|0)
if versionLessThan 1.13; then
MODE=0