#!/bin/bash # Debug: Show current directory and files echo "Debug: Current dir: $(pwd)" echo "Debug: Files in /opt/minecraft: $(ls -l /opt/minecraft)" # Debug: Check Java version echo "Debug: Java version:" java -version # Run dummy HTTP server in background (quiet output) # This will serve the directory listing on port 7860 python3 -m http.server 7860 > /dev/null 2>&1 & # Run playit.gg in background (output goes to logs) playit --secret $PLAYIT_SECRET & # Wait a bit for playit to start (optional, helps with timing) sleep 5 # Run Minecraft in FOREGROUND (so its logs show in Hugging Face) echo "Starting Minecraft server..." java -Xmx12G -Xms1G -jar server.jar nogui || echo "Error: Minecraft failed with exit code $?"