A Spigot 1.21 plugin that provides server restart functionality with a countdown timer.
/resta- Starts a 10-second countdown timer and restarts the server/resta stop- Cancels an active restart countdown- Broadcasts countdown messages to all players
- Permission-based access control
-
Locate the compiled JAR file in the
targetfolder:target/ServerRestart-1.0.0.jar -
Copy the JAR file to your Spigot server's
pluginsfolder -
Restart your server or load the plugin with a plugin manager
Execute the command:
/resta help
This displays all available commands and information about the plugin.
Execute the command:
/resta
This will:
- Broadcast "Server is restarting in 10 seconds!" to all players
- Display a countdown every second (10, 9, 8, 7... 1)
- Restart the server after the countdown completes
- Requires
serverrestart.usepermission
Execute the command:
/resta stop
This will cancel an active restart countdown and notify all players.
- Requires
serverrestart.usepermission
serverrestart.use- Required to use both/restaand/resta stopcommands- Default: OP only
- Grant to specific players/groups using your permissions plugin
- Spigot 1.21 or higher
- Java 17 or higher
This project uses Maven. To build:
./mvnw clean packageThe compiled JAR will be in the target folder.
When you first run the plugin, it will automatically create a folder at plugins/ServerRestart/ with a config.yml file inside.
# Countdown duration in seconds (default: 10)
countdown-seconds: 10
# Customize all messages with color codes
messages:
restart-announcement: "&c&lServer is restarting in {time} seconds!"
countdown: "&eServer restarting in &c{time} &esecond{s}..."
restart-now: "&c&lServer is restarting now!"
restart-cancelled: "&a&lServer restart has been cancelled!"
# ... and more!Available placeholders:
{time}- Shows the countdown time or total seconds{s}- Shows 's' for plural or nothing for singular (e.g., "1 second" vs "2 seconds")
Color codes: &a=green, &c=red, &e=yellow, &f=white, &6=gold, &7=gray, &l=bold
After editing the config, reload your server or use a plugin manager to reload the plugin.
For issues or questions, please check your server console logs for any error messages.
Current version: 1.0.0