Skip to main content
The Maintenance API provides programmatic access to control and monitor maintenance mode on your Minecraft server. It allows plugin developers to integrate with Maintenance’s features, listen to events, and manage the maintenance state.

What You Can Do

The Maintenance API enables you to:
  • Toggle maintenance mode programmatically
  • Check maintenance status and running tasks
  • Manage whitelisted players during maintenance
  • Listen to maintenance events (mode changes, config reloads)
  • Access configuration settings from your plugin
  • Control debug mode for troubleshooting

Use Cases

Server Management Plugins

Integrate maintenance mode controls into your server management dashboard or control panel.

Event-Based Automation

React to maintenance mode changes with custom logic.

Player Management

Dynamically manage who can join during maintenance.

API Structure

The API is organized into several key interfaces:

Core Interfaces

  • Maintenance - Main API interface for controlling maintenance mode
  • MaintenanceProvider - Static provider to access the API instance
  • Settings - Access to configuration and whitelist management

Event System

  • EventManager - Register listeners for maintenance events
  • MaintenanceChangedEvent - Fired when maintenance mode changes
  • MaintenanceReloadedEvent - Fired when configuration is reloaded
  • EventListener - Functional interface for event handling

Key Methods

The Maintenance interface (from /home/daytona/workspace/source/api/src/main/java/eu/kennytv/maintenance/api/Maintenance.java) provides:
The Settings interface provides whitelist management and configuration access:

Platform Support

The API works across all supported platforms:
  • Paper/Spigot
  • BungeeCord/Waterfall
  • Velocity
  • Sponge
The core API remains the same regardless of platform, ensuring consistent behavior.

Next Steps

  • Setup - Add the API to your project and get started
  • Events - Learn about the event system
  • Settings API - Work with settings and config