Maintenance interface is the primary entry point for interacting with the Maintenance plugin. It provides methods to control maintenance mode, access settings, and manage debug mode.
Obtaining the API Instance
Get the API instance using theMaintenanceProvider:
Methods
setMaintenance
Enables or disables maintenance mode. When enabled, all non-permitted players will be kicked.boolean
required
true to enable maintenance mode, false to disable itvoid
This method does not return a value
If using the BungeeCord version with Redis enabled, the maintenance state will also be written to the database.
isMaintenance
Checks if maintenance mode is currently enabled.boolean
true if maintenance is currently enabled, false otherwiseisTaskRunning
Checks if a start or end timer task is currently running.boolean
true if a timer task is currently running, false otherwisegetVersion
Returns the version of the Maintenance plugin.String
The plugin version string
getSettings
Returns the Settings instance for accessing configuration and whitelist management.getEventManager
Returns the EventManager instance for registering listeners to maintenance events.EventManager
The EventManager instance
isDebug
Checks if debug mode is enabled.boolean
true if debug mode is enabled, false otherwiseDebug mode is currently only implemented on the BungeeCord version.
setDebug
Enables or disables debug mode.boolean
required
true to enable debug mode, false to disable itvoid
This method does not return a value