Skip to main content

Overview

The Maintenance plugin supports scheduled maintenance activation and deactivation using timers. Timers can broadcast countdown messages to players and automatically enable or disable maintenance mode at specified times.

Timer Types

There are two types of timers:
  • Start Timer: Counts down to enabling maintenance mode
  • End Timer: Counts down to disabling maintenance mode

Continue Timer After Restart

This feature allows endtimers to persist across server restarts.
continue-endtimer-after-restart.enabled
boolean
default:"false"
If enabled and the server restarts while an endtimer is running, the timer will continue after restart.If the timer ends while the server is offline, maintenance will be disabled as soon as the server starts again.
continue-endtimer-after-restart.end
number
default:"0"
Internal timestamp for when the timer ends. This value is automatically set when a timer is started, cancelled, or ended.
Do not manually change this value. It is managed by the plugin.

Configuration Example

continue-endtimer-after-restart:
  enabled: true
  end: 0

Timer Broadcasts

When using timer commands, you can configure at which intervals broadcasts will be sent to players before maintenance is enabled or disabled.
timer-broadcast-for-seconds
array
List of seconds before the timer ends when broadcasts should be sent. Broadcasts occur at each specified interval.Default intervals:
  • 1200 seconds (20 minutes)
  • 900 seconds (15 minutes)
  • 600 seconds (10 minutes)
  • 300 seconds (5 minutes)
  • 120 seconds (2 minutes)
  • 60 seconds (1 minute)
  • 30, 20, 10, 5, 4, 3, 2, 1 seconds

Configuration Example

# Default broadcast intervals
timer-broadcast-for-seconds: [1200, 900, 600, 300, 120, 60, 30, 20, 10, 5, 4, 3, 2, 1]

# Custom intervals - only broadcast at major milestones
timer-broadcast-for-seconds: [3600, 1800, 600, 300, 60, 30, 10, 5]

# Minimal broadcasts - only final countdown
timer-broadcast-for-seconds: [300, 60, 10, 5, 4, 3, 2, 1]

Timer Commands

Use these commands to manage maintenance timers:

Start Timer

Schedule maintenance to be enabled after a specified duration:
# Enable maintenance in 10 minutes
/maintenance starttimer 10m

# Enable maintenance in 1 hour
/maintenance starttimer 1h

# Enable maintenance in 30 seconds
/maintenance starttimer 30s

End Timer

Schedule maintenance to be disabled after a specified duration:
# Disable maintenance in 2 hours
/maintenance endtimer 2h

# Disable maintenance in 45 minutes
/maintenance endtimer 45m

# Disable maintenance in 30 minutes
/maintenance endtimer 30m

Time Formats

Timers support the following time formats:
FormatDescriptionExample
sSeconds30s = 30 seconds
mMinutes15m = 15 minutes
hHours2h = 2 hours
dDays1d = 1 day
You can also combine formats:
# 1 hour and 30 minutes
/maintenance endtimer 1h30m

# 2 hours, 15 minutes, and 30 seconds
/maintenance starttimer 2h15m30s

Cancel Timer

Cancel a running timer:
/maintenance aborttimer

Timer Variables in Messages

When a timer is active, you can use the %TIMER% variable in your maintenance messages to display the remaining time:
ping-message:
  enable-timer-specific-messages: true
  timer-messages:
    - "<red>Maintenance Mode<br><yellow>Back online in: %TIMER%"

player-count-message:
  enable-timer-specific-message: true
  timer-message: "<dark_red>Online in: <yellow>%TIMER%"

player-list-hover-message:
  enable-timer-specific-message: true
  timer-message: "<red>Server returns in:<br><yellow>%TIMER%"
See the Maintenance Messages page for more details on message configuration.

Permissions

Timer-related permissions:
PermissionDescription
maintenance.starttimerAllows using the /maintenance starttimer command
maintenance.endtimerAllows using the /maintenance endtimer command
maintenance.aborttimerAllows using the /maintenance aborttimer command

Example Use Cases

Scheduled Maintenance Window

Enable maintenance in 1 hour and automatically disable it after 2 hours:
# Schedule maintenance to start in 1 hour
/maintenance starttimer 1h

# After maintenance is enabled, schedule it to end in 2 hours
/maintenance endtimer 2h

Quick Restart Warning

Warn players of an imminent restart:
# Enable maintenance in 5 minutes
/maintenance starttimer 5m
Players will receive broadcasts at the configured intervals (5 minutes, 4 minutes, 3 minutes, 2 minutes, 1 minute, 30s, 20s, 10s, etc.).

Extended Maintenance

For maintenance that persists across restarts:
continue-endtimer-after-restart:
  enabled: true
  end: 0
Then set an endtimer:
# Maintenance will end in 4 hours, even if server restarts
/maintenance endtimer 4h

Build docs developers (and LLMs) love