Speeds up Pufferfish/Purpur map rendering & math. Note: Java's 'WARNING: Using incubator modules' message on startup is normal.
Allocates 85% of selected RAM to prevent Docker container OOM kills and fixes console colors.
Wraps start.sh and start.bat in a loop so the server automatically restarts after a crash or stop.
Opens the desktop server GUI window. Leave off (--nogui) on dedicated hosts to save memory.
Adds -XX:+UseTransparentHugePages to reduce memory lookup overhead on Linux hosts.
Adds -XX:+HeapDumpOnOutOfMemoryError to save a .hprof memory dump if the server runs out of RAM.
Adds -Dfile.encoding=UTF-8 so custom symbols and chat characters don't break on Windows hosts.
Adds -Dlog4j2.formatMsgNoLookups=true to block Log4j JNDI lookup exploits on older server jars.
Adds -DPaper.IgnoreJavaVersion=true so Paper starts even on newer or unsupported Java versions.
java -Xms8192M -Xmx8192M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -jar server.jar --nogui