Skip to main content
The ServerMaintenanceChangedEvent is a proxy-specific event that is fired whenever maintenance mode is enabled or disabled on an individual server behind a proxy (BungeeCord/Velocity).
This event is only available when using the Maintenance plugin on a proxy server (BungeeCord or Velocity). It is not available on standalone Spigot/Paper servers.

Event Details

Package: eu.kennytv.maintenance.api.event.proxy Type: Notification event (read-only) Available on: Proxy servers only (BungeeCord/Velocity) Fired when:
  • Maintenance mode is enabled on a specific backend server
  • Maintenance mode is disabled on a specific backend server
  • The /maintenance <server> command is used to toggle server maintenance

Class Definition

Methods

getServer()

Returns the wrapped server object for the server that changed maintenance status.
Returns: The Server wrapper object
The returned server does not necessarily have to be an existing/registered server. If maintenance is disabled on a previously registered server that no longer exists, this will still return a Server object. Use server.isRegisteredServer() to check if the server is currently registered under the proxy.

isMaintenance()

Returns whether maintenance mode has been enabled or disabled on the server.
Returns: true if maintenance has been enabled on the server, false if it has been disabled

Server Interface

The Server object provides the following methods:

Usage Example

Basic Example

Example: Broadcasting to Server Players

Example: Discord Integration

Example: Load Balancer Integration

Example: Metrics Tracking

See Also