Skip to main content
The Maintenance plugin includes a powerful timer system that can automatically enable or disable maintenance mode after a specified duration, with automatic broadcasts to warn players.

Timer Commands

Start Timer

Schedule maintenance mode to be enabled after a specific duration:

End Timer

Schedule maintenance mode to be disabled after a specific duration:

Abort Timer

Cancel a currently running timer:

Schedule Timer

Combine start and end timers into a scheduled maintenance window:
The schedule command takes two durations: the first is when to enable maintenance, and the second is how long maintenance should last.

Duration Formats

The plugin supports flexible duration formats using hours (h), minutes (m), and seconds (s):

Single Units

Combined Units

ISO 8601 Duration Format

The plugin also accepts standard ISO 8601 duration strings:
Timers have a maximum duration to prevent extremely long tasks. Attempting to set a timer beyond this limit will result in an error.

Broadcast Intervals

When a timer is running, the plugin automatically broadcasts warnings to players at configured intervals. Configure these intervals in config.yml:
Default broadcast intervals:
  • 20 minutes (1200s)
  • 15 minutes (900s)
  • 10 minutes (600s)
  • 5 minutes (300s)
  • 2 minutes (120s)
  • 1 minute (60s)
  • 30 seconds
  • 20 seconds
  • 10, 5, 4, 3, 2, 1 seconds

Customizing Broadcast Intervals

You can customize when broadcasts occur:
Broadcast intervals are specified in seconds. To add a 25-minute warning, use 1500 (25 × 60 = 1500).

Timer Persistence

Timers can persist across server restarts, so if your server crashes or restarts while a timer is running, it will continue when the server comes back online.

Configuration

1

Enable timer persistence

Set enabled: true under continue-endtimer-after-restart in config.yml.
2

Start a timer

Run /maintenance endtimer 2h or any timer command.
3

Restart the server

The plugin saves the timer’s end time to the config automatically.
4

Timer resumes after restart

When the server starts, the plugin checks if the timer has finished and resumes or completes it accordingly.

How It Works

  1. Timer starts: The end timestamp is saved to config.yml
  2. Server restarts: The plugin reads the saved timestamp
  3. Time remaining calculated: If time remains, the timer continues
  4. Timer expired offline: If the timer ended during downtime, maintenance is toggled immediately
  5. Timer completes: The saved timestamp is reset to 0
Only endtimers (timers that disable maintenance) are persisted. Start timers and schedule timers are not saved across restarts to prevent unintended maintenance enabling during outages.

Proxy Mode Timers

On BungeeCord and Velocity, you can run timers for individual backend servers:

Timer Display

The %TIMER% placeholder shows the remaining time in a human-readable format:

In MOTD Messages

In Broadcast Messages

Customize timer broadcast messages in your language file:

Use Cases

Scheduled Maintenance Window

This will:
  1. Broadcast warnings at configured intervals for 2 hours
  2. Enable maintenance automatically after 2 hours
  3. Broadcast countdown messages for 1 hour
  4. Disable maintenance automatically after 1 hour

Quick Restart Warning

Temporary Maintenance

Advance Notice

Permissions

Example Workflow

1

Announce scheduled maintenance

2

Automatic broadcasts begin

Players receive warnings at: 20m, 15m, 10m, 5m, 2m, 1m, 30s, etc.
3

Maintenance enables automatically

After 1 hour, maintenance mode activates and players are kicked (unless whitelisted).
4

Countdown broadcasts continue

During the 30-minute maintenance window, broadcasts show time remaining.
5

Maintenance disables automatically

After 30 minutes, maintenance mode ends and players can rejoin.