Skip to main content
The MaintenanceProxy interface extends the base Maintenance interface with proxy-specific functionality for managing maintenance mode on individual backend servers in a proxy network.

Interface

Methods

Server Maintenance Management

setMaintenanceToServer

Enables or disables maintenance mode on a specific proxied server.
Server
required
The server to apply the maintenance status to. Obtain using getServer(String).
boolean
required
true to enable maintenance mode, false to disable it.
boolean
true if the maintenance mode was changed, false otherwise.
When maintenance is enabled on a server, all non-permitted players will be kicked from that server. If Redis is enabled, the maintenance status will also be written to the database. Example:

isMaintenance

Checks if maintenance mode is currently enabled on a specific proxied server.
Server
required
The server to check. Obtain using getServer(String).
boolean
true if maintenance is currently enabled on the server, false otherwise.
Example:

isServerTaskRunning

Checks if a start or end timer task is currently running for a specific proxied server.
Server
required
The server to check. Obtain using getServer(String).
boolean
true if a timer task is currently running for the server, false otherwise.
Example:

Server Retrieval

getServer

Retrieves a wrapped Server object for a proxied server by name.
String
required
The name of the proxied server.
Server
The wrapped server object if the server exists, or null if not found.
Example:

getServerOrDummy

Retrieves a wrapped Server object for a proxied server, or returns a dummy server if not registered.
String
required
The name of the proxied server.
Server
The wrapped server object if registered, or a DummyServer instance if not.
This method never returns null. Use Server.isRegisteredServer() to check if the returned server is a real registered server or a dummy. Example:

getServers

Retrieves all currently registered proxied servers.
Set<String>
A set containing the names of all registered proxied servers.
Example:

getMaintenanceServers

Retrieves all proxied servers that are currently under maintenance.
Set<String>
An immutable set containing the names of all servers currently under maintenance.
Example:

Complete Usage Example

See Also