mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Added CONSOLE envvar to control console output
By default, CONSOLE is true. When set to false, start-minecraft.sh adds "--noconsole" to java. Use this to keep Spigot from burning CPU.
This commit is contained in:
parent
4c0f24613c
commit
aa13deecdb
@ -40,4 +40,4 @@ ENV UID=1000 GID=1000 \
|
||||
MOTD="A Minecraft Server Powered by Docker" \
|
||||
JVM_OPTS="-Xmx1024M -Xms1024M" \
|
||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED LEVEL=world PVP=true DIFFICULTY=easy \
|
||||
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= ONLINE_MODE=TRUE
|
||||
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= ONLINE_MODE=TRUE CONSOLE=true
|
||||
|
@ -441,10 +441,16 @@ if [ "$TYPE" = "SPIGOT" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $CONSOLE = false ]]; then
|
||||
EXTRA_ARGS=--noconsole
|
||||
else
|
||||
EXTRA_ARGS=""
|
||||
fi
|
||||
|
||||
# If we have a bootstrap.txt file... feed that in to the server stdin
|
||||
if [ -f /data/bootstrap.txt ];
|
||||
then
|
||||
exec java $JVM_OPTS -jar $SERVER "$@" < /data/bootstrap.txt
|
||||
exec java $JVM_OPTS -jar $SERVER "$@" $EXTRA_ARGS < /data/bootstrap.txt
|
||||
else
|
||||
exec java $JVM_OPTS -jar $SERVER "$@"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user