mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-31 11:17:14 +00:00
@@ -80,7 +80,7 @@ esac
|
|||||||
|
|
||||||
EXTRA_ARGS=""
|
EXTRA_ARGS=""
|
||||||
# Optional disable console
|
# Optional disable console
|
||||||
if [[ ${CONSOLE} = false || ${CONSOLE} = FALSE ]]; then
|
if versionLessThan 1.14 && [[ ${CONSOLE,,} = false ]]; then
|
||||||
EXTRA_ARGS+="--noconsole"
|
EXTRA_ARGS+="--noconsole"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+15
@@ -63,3 +63,18 @@ function normalizeMemSize {
|
|||||||
val=${1:0: -1}
|
val=${1:0: -1}
|
||||||
echo $(( val * scale ))
|
echo $(( val * scale ))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function versionLessThan {
|
||||||
|
local activeParts
|
||||||
|
IFS=. read -ra activeParts <<< "${VANILLA_VERSION}"
|
||||||
|
|
||||||
|
local givenParts
|
||||||
|
IFS=. read -ra givenParts <<< "$1"
|
||||||
|
|
||||||
|
if (( activeParts[0] < givenParts[0] )) || \
|
||||||
|
(( activeParts[0] == givenParts[0] && activeParts[1] < givenParts[1] )); then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user