From 2afbdc959e04f12b264d9972f80384a69f6c407c Mon Sep 17 00:00:00 2001 From: Nick Lloyd Date: Fri, 1 Jan 2016 17:03:04 -0500 Subject: [PATCH 1/3] added special handling for on startup gamerules (/gamerule commands), unfortunately will clobber stdin for the running server process --- minecraft-server/start-minecraft.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/minecraft-server/start-minecraft.sh b/minecraft-server/start-minecraft.sh index 92513ab0..57a0d138 100755 --- a/minecraft-server/start-minecraft.sh +++ b/minecraft-server/start-minecraft.sh @@ -253,5 +253,12 @@ do fi done +# If we have a gamerules.txt file... feed that in to the server stdin +if [ -f /data/gamerules.txt ]; +then + exec java $JVM_OPTS -jar $SERVER < /data/gamerules.txt +else + exec java $JVM_OPTS -jar $SERVER +fi exec java $JVM_OPTS -jar $SERVER From 4b74d13f08e7e70fb20c6bb6de354348aadac2ac Mon Sep 17 00:00:00 2001 From: Nick Lloyd Date: Fri, 1 Jan 2016 17:11:10 -0500 Subject: [PATCH 2/3] removing old exec java call --- minecraft-server/start-minecraft.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/minecraft-server/start-minecraft.sh b/minecraft-server/start-minecraft.sh index 57a0d138..364b5938 100755 --- a/minecraft-server/start-minecraft.sh +++ b/minecraft-server/start-minecraft.sh @@ -260,5 +260,3 @@ then else exec java $JVM_OPTS -jar $SERVER fi - -exec java $JVM_OPTS -jar $SERVER From 63e3123ab05f07c60fe0f7d42ecf5df6624bcc78 Mon Sep 17 00:00:00 2001 From: Nick Lloyd Date: Wed, 6 Jan 2016 15:55:45 -0500 Subject: [PATCH 3/3] gamerules.txt is now bootstrap.txt --- minecraft-server/start-minecraft.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/minecraft-server/start-minecraft.sh b/minecraft-server/start-minecraft.sh index 364b5938..28b12840 100755 --- a/minecraft-server/start-minecraft.sh +++ b/minecraft-server/start-minecraft.sh @@ -253,10 +253,10 @@ do fi done -# If we have a gamerules.txt file... feed that in to the server stdin -if [ -f /data/gamerules.txt ]; +# 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/gamerules.txt + exec java $JVM_OPTS -jar $SERVER < /data/bootstrap.txt else exec java $JVM_OPTS -jar $SERVER fi