mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
parent
1c2a0c506c
commit
8dbbdd8cd2
@ -80,7 +80,7 @@ esac
|
||||
|
||||
EXTRA_ARGS=""
|
||||
# Optional disable console
|
||||
if [[ ${CONSOLE} = false || ${CONSOLE} = FALSE ]]; then
|
||||
if versionLessThan 1.14 && [[ ${CONSOLE,,} = false ]]; then
|
||||
EXTRA_ARGS+="--noconsole"
|
||||
fi
|
||||
|
||||
|
15
start-utils
15
start-utils
@ -63,3 +63,18 @@ function normalizeMemSize {
|
||||
val=${1:0: -1}
|
||||
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
|
||||
}
|
Loading…
Reference in New Issue
Block a user