Skip to content

Commit

Permalink
Add NoScreen environment variable - fix issue TheRemote#1
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberops7 committed Dec 17, 2023
1 parent d91ae83 commit b6cf203
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ With a custom Minecraft version (add -e Version=1.X.X, must be present on Paper'
<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e Version=1.17.1 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>
With a maximum memory limit in megabytes (optional, prevents crashes on platforms with limited memory, -e MaxMemory=2048):
<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e MaxMemory=2048 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>
Without using the screen application (useful if the container won't launch saying "Must be connected to a terminal.", will disable some logging features):
<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e NoScreen=Y 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>

<h2>Configuration / Accessing Server Files</h2>
The server data is stored where Docker stores your volumes. This is typically a folder on the host OS that is shared and mounted with the container.<br>
Expand Down Expand Up @@ -94,7 +96,8 @@ A popular place to get plugins is: <a href="https://dev.bukkit.org/bukkit-plugin
<ul>
<li>August 22nd 2022</li>
<ul>
<li>Add NoScreen environment variable -- thjs disables screen which prevents needing an interactive terminal (but disables some logging)</li>
<li>Add NoScreen environment variable -- disables screen which prevents needing an interactive terminal (but disables some logging)</li>
<li>Fix issue #1 (thanks Sam7, <a href="https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate/issues/1">issue #1</a>)</li>
</ul>
<li>August 18th 2022</li>
<ul>
Expand Down
2 changes: 2 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,14 @@ if [[ -z "$MaxMemory" ]] || [[ "$MaxMemory" -le 0 ]]; then
if [ -z "$NoScreen" ]; then
screen -L -Logfile /minecraft/logs/minecraft.$(date +%Y.%m.%d.%H.%M.%S).log -mS minecraft /jre/bin/java -XX:+UnlockDiagnosticVMOptions -XX:-UseAESCTRIntrinsics -DPaper.IgnoreJavaVersion=true -Xms400M -jar /minecraft/paperclip.jar
else
echo "NoScreen switch present -- launching without screen (logging will be negatively impacted)"
/jre/bin/java -XX:+UnlockDiagnosticVMOptions -XX:-UseAESCTRIntrinsics -DPaper.IgnoreJavaVersion=true -Xms400M -jar /minecraft/paperclip.jar
fi
else
if [ -z "$NoScreen" ]; then
screen -L -Logfile /minecraft/logs/minecraft.$(date +%Y.%m.%d.%H.%M.%S).log -mS minecraft /jre/bin/java -XX:+UnlockDiagnosticVMOptions -XX:-UseAESCTRIntrinsics -DPaper.IgnoreJavaVersion=true -Xms400M -Xmx${MaxMemory}M -jar /minecraft/paperclip.jar
else
echo "NoScreen switch present -- launching without screen (logging will be negatively impacted)"
/jre/bin/java -XX:+UnlockDiagnosticVMOptions -XX:-UseAESCTRIntrinsics -DPaper.IgnoreJavaVersion=true -Xms400M -Xmx${MaxMemory}M -jar /minecraft/paperclip.jar
fi
fi

0 comments on commit b6cf203

Please sign in to comment.