AutoRestart A small, simple plugin to keep your players in the know, and your server running nice and fresh.
Features
Restart your server automatically at the configured times of day
Cancel restarts on command if necessary
Add configurable messages, titles, and sounds to any time of the restart (and to cancellations too!)
Configurable times to restart
Commands
/autorestart [time] - Restart your server after the specified time set in the config, or your own time in seconds (autorestart.restart). Cancels the restart if it's already counting down.
/autorestart reload - Reloads the config (autorestart.reload).
Installation
Unpack the zip file downloaded.
Place the AutoRestart jar in your plugins folder.
Stop your server.
Follow the steps in the README file to run your server with the included script. The script uses Aikar's optimized PaperMC flags and should improve the performance of your server if you're not using them already.
Enjoy!
Default Config
Code (YAML):
#Interval for checking restart times (value in TICKS, 20 ticks = 1 second) #An interval of 20 or less is required for DateFormats (below) with seconds checking-interval: 1200
#Date format for the times below #Refer to https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html for more info #Please do not check for miliseconds, it won't work DateFormat: "HH:mm"
#Times of restart #MUST USE DATE FORMAT ABOVE! times: -
"0:00" -
"12:00"
#When a time above is met, how long should AutoRestart set the timer to? (value in seconds) time-to-autorestart: 900
#Message when players do not have permission for a command no-perm-message: "&cInsufficient Permission"
#Please make sure each sub-option a time value in seconds surrounded in quotes or the config will die #Example: '100' would be 1m 40s restart-options:
'60':
message: "&c&lServer Restarting in 60 Seconds!"#message is optional title:
title: "&c&lServer Restarting"#Required if title enabled #below are optional for title subtitle: "&c&l60 Seconds" fade-in: 20
#Default is is 10 (If value not specified) stay: 100
#Default is 70 fade-out: 20
#Default is 20 sound:
sound: BLOCK_NOTE_PLING
#Required if sound enabled #below are optional for sound volume: 1
pitch: 1
'30':
message: "&c&lServer Restarting in 30 Seconds!" sound:
sound: BLOCK_NOTE_PLING
'10':
message: "&c&lServer Restarting in 10 Seconds!" title:
title: "&c&lServer Restarting in 10 Seconds!" sound:
sound: BLOCK_NOTE_PLING
#Same as above, except played when server restart is cancelled by an admin cancel-options:
message: "&a&lServer restart was canceled by an admin" title:
title: "&aServer restart canceled"