Launching Script

Here the code for use in linux as craftbukkit.sh
you need to rename craftbukkit.jar as your file name
this code will run the game and recreate map each time the server close

#!/bin/sh
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "\$BINDIR"
while true
do
	java -Xmx1024M -Xms1024M -jar craftbukkit.jar
	echo "If you want to completely stop the server process now, press Ctrl+C before the time is up!"
	echo "Deleting worlds"
	rm -rf world
	rm -rf world_nether
	rm -rf world_the_end
	echo "Rebooting in:"
	for i in 5 4 3 2 1
	do
		echo "$i..."
		sleep 1
		done
	echo "Rebooting now!"
done

Comments

Posts Quoted:
Reply
Clear All Quotes