Orbitmod / start.sh
Tokipo's picture
Upload 7 files
abd5fbb verified
#!/bin/bash
set -e
if [ ! -z "$PLAYIT_SECRET" ]; then
playit --secret "$PLAYIT_SECRET" > /dev/null 2>&1 &
sleep 5
fi
if [ -f "download_world.py" ]; then
python3 download_world.py 2>&1 || true
fi
chmod -R 777 /app 2>/dev/null || true
echo "🚀 Starting Minecraft Server"
exec java -server -Xmx8G -Xms8G \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC \
-XX:+AlwaysPreTouch \
-XX:G1NewSizePercent=30 \
-XX:G1MaxNewSizePercent=40 \
-XX:G1HeapRegionSize=16M \
-XX:G1ReservePercent=15 \
-XX:G1HeapWastePercent=5 \
-XX:G1MixedGCCountTarget=4 \
-XX:InitiatingHeapOccupancyPercent=20 \
-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 \
-jar server.jar --nogui