Advanced Restart

Advanced Restart

A highly-configurable plugin for automatically stopping and restarting servers.

3 507 downloads 22 followers

Advanced Restart

About

Advanced Restart is a lightweight and highly-configurable plugin. It can automatically restart your server with a variety of triggers such as runtime, lag, inactivity and you can even schedule restarts daily or throughout week.

Configurable Messages

Server Restart Messages

Features:

  • Schedule Restarts
  • Periodic Restarts
  • Warn players before restart
  • Restart if TPS drops too low
  • Restart if RAM usage gets to high
  • Multiple shutdown methods
  • Almost everything in the plugin is configurable
  • + more
Config
# AdvancedRestart by _txsla / NBT Archives
# Messages are formatted with MiniMessage
# Format generator: https://webui.advntr.dev/
# Documentation: https://docs.advntr.dev/minimessage/format.html
# set messages to null to disable

# Restarts daily or a certain day/time of the week
# Use the format 'ddd-hh:mm' ; Use 24h time
# Days are MON, TUE, WED, THU, FRI, SAT, SUN or ALL for daily
scheduledRestart:
    enabled: false
    schedule:
      - 'ALL-12:00'
      - 'TUE-02:45'
      - 'Fri-14:45'
    message: '<green>- Scheduled Server Restart -</green>'

# Restart if server has been running for a certain amount of time
periodicRestart:
  enabled: false
  duration: 1440 #minutes
  message: '<green>Server runtime: %RUNTIME minutes - Restarting</green>'

# Sets a warning period before restart
# Only applies to periodicRestart and scheduledRestart
restartWarning:
  # Sends a message x seconds before the server restarts
  secondsWarn:
    enabled: true
    seconds: 5
    countdown: true # send the message every second?
    message: '<red>Server restarting in %S seconds!</red>'
  # Sends a message x minutes before the server restarts
  minuteWarn:
    enabled: false
    minutes: 5
    countdown: true # send the message every minute?
    message: '<green>Server restarting in %M minutes!</green>'

# Restarts server when there are no players online
# Timer cycles from first player join
# Will NOT restart server if no players have joined
inactiveRestart:
  enabled: false
  timer: 300 # seconds
  message: '<green>No players online: Restarting</green>'

# Restart if server gets too laggy
lagRestart:
  lowTPS:
    enabled: false
    minTPS: 10 # TPS
    checks: 3 # how many consecutive failed checks before restart, lower number will restart sooner
    message: '<dark_red>Server TPS dropped below %TPS - Restarting<dark_red>'
  lowMemory:
    enabled: false
    maxMemUsage: 4096 # MB
    checks: 5 # how many consecutive failed checks before restart, lower number will restart sooner
    message: '<dark_red>Server RAM usage exceeded %MEM - Restarting</dark_red>'

# Server shutdown method
# 1 = Bukkit.shutdown()
# 2 = Bukkit.spigot().restart()
# 3 = only run shutdown commands
shutdownMethod: 1
shutdownMessage: '<dark_red>Stopping Server</dark_red>'

# Commands to be executed (as console) at shutdown
# if the list is NOT null, the server shutdown is delayed 2 seconds to allow the commands to fully execute
# Set to null to disable
# Do not prefix '/'
shutdownCommands:
  - 'playsound entity.experience_orb.pickup master @a ~ ~ ~ 1'
  - 'title @a title {"color":"red","shadow_color":-8912896,"text":"Server Restarting"}'
  - 'title @a actionbar {"color":"green","text":"Please rejoin momentarily"}'
  - 'any number of commands are allowed (invalid commands like this one should be ignored'


debug: false
Commands

advancedrestart
  |disable - stops the server from restarting
  |enable - allows the server to restart
  |status - get information on the state of the plugin
  |soft-reload - reload the plugin's configs
  |config
  |  |read - easily read current config options
  |  \reload - reload plugins configs, same as soft-reload
  |debug
  |  |enable - enable debut output to console without changing config
  |  |disable - stop debug output to console without changing config
  |  \query - outputs wether debug output is on or off
  |stop - stops the server
  |  \force - stop even if restarting is currently disabled

Support

If you stumble across any bugs, please create a support ticket.

Version Minecraft Loader Download

Advanced Restart 1.2.1

1.2.1

1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10
bukkit, paper, purpur, spigot
Download

Advanced Restart 1.2.0

1.2.0

1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8
bukkit, paper, purpur, spigot
Download

Advanced Restart 1.1.1

1.1.1

1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4
bukkit, paper, purpur, spigot
Download

Advanced Restart 1.1.0

1.1.0

1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4
bukkit, paper, purpur, spigot
Download

Advanced Restart 1.0

1.0

1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4
bukkit, paper, purpur, spigot
Download