RestartAnnounce

RestartAnnounce

Tired of having to spam the chat with "Quick restart restart!" just for players to notice you're restarting the server? RestartAnnounce is a plugin that uses Minecraft's scoreboard system to announce server restarts with a visible timer. When the timer hits 0, your server will shut down.

RestartAnnounce has been deployed on the BeastsMC servers for over a month now with no issues or bug.

Features

  • Innovative way to alert players of scheduled restarts using scoreboards as a timer
  • Automatically shuts down the server when timer hits 0
  • Schedule restarts to occur in the future without any staff being online
  • Schedule restarts to occur at set intervals
  • Interval restarts don't display unless there is less than 60 minutes until shutdown

Commands

/sr <seconds>: Schedule a restart to occur in <seconds> /sr reload: Reload the plugin's config.yml, also cancels any active scheduled restarts or interval restarts. /sr time: Check the remaining time to the next planned restart. /cancelrestart: Cancel a restart that is currently scheduled

Permissions

restartannounce.admin - Allow the usage of /sr and /cancelrestart restartannounce.reload - Allows the usage of /sr reload restartannounce.time - Allows for the usage of /sr time

Startup Script

RestartAnnounce merely shuts down your server. For the plugin to start up the server after it called a shutdown would be very hacky. However, you can modify your startup script to start the server up for you. In your server directory, create a file called run.sh:

#!/bin/sh
SERVERDIR="/path/to/the/server/directory"
screen -S "Minecraft" bash -c "sh $SERVERDIR/loop.sh"

Then create another file called loop.sh:

#!/bin/sh
STARTUPLINE="java -Xincgc -Xmx2G -jar craftbukkit.jar"
while true
do
	$STARTUPLINE
	echo "If you want to completely stop the server process now, press Ctrl+C before the time is up!"
	echo "Rebooting in:"
	for i in 5 4 3 2 1
	do
		echo "$i..."
		sleep 1
	done
	echo "Rebooting now!"
done

To start your server, use: ./run.sh

Source

https://github.com/BeastsMC/RestartAnnounce


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files