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 modeMaintenanceProvider- Static provider to access the API instanceSettings- Access to configuration and whitelist management
Event System
EventManager- Register listeners for maintenance eventsMaintenanceChangedEvent- Fired when maintenance mode changesMaintenanceReloadedEvent- Fired when configuration is reloadedEventListener- Functional interface for event handling
Key Methods
TheMaintenance interface (from /home/daytona/workspace/source/api/src/main/java/eu/kennytv/maintenance/api/Maintenance.java) provides:
Settings interface provides whitelist management and configuration access:
Platform Support
The API works across all supported platforms:- Paper/Spigot
- BungeeCord/Waterfall
- Velocity
- Sponge
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