Settings interface provides access to plugin configuration and methods for managing the maintenance whitelist.
Obtaining the Settings Instance
Get the Settings instance from the main Maintenance API:Methods
isMaintenance
Returns whether maintenance is currently enabled.boolean
true if maintenance is currently enabled, false otherwiseisEnablePingMessages
Checks if custom ping messages during maintenance should be displayed.boolean
true if custom ping messages are enabled, false otherwiseisJoinNotifications
Checks if join notifications are enabled.boolean
Value of the
send-join-notification config fieldhasCustomIcon
Checks if a custom maintenance server icon is configured.boolean
Value of the
custom-maintenance-icon config fieldgetWhitelistedPlayers
Returns a map of all maintenance-whitelisted players.Map<UUID, String>
Map of player UUIDs to their saved names
The player names in the returned map might be outdated if a player has changed their name.
isWhitelisted
Checks if a player UUID is on the maintenance whitelist.UUID
required
The UUID of the player to check
boolean
true if the UUID is whitelisted, false otherwiseaddWhitelistedPlayer
Adds a player to the maintenance whitelist.UUID
required
The UUID of the player to add
String
required
The name of the player to add
boolean
true if the player was successfully added, false if already on the whitelistremoveWhitelistedPlayer (UUID)
Removes a player from the maintenance whitelist by UUID.UUID
required
The UUID of the player to remove
boolean
true if the player was successfully removed, false otherwiseremoveWhitelistedPlayer (String)
Removes a player from the maintenance whitelist by name.String
required
The name of the player to remove (with original case)
boolean
true if the player was successfully removed, false otherwisereloadConfigs
Reloads all configuration files including maintenance icon, config, language file, and whitelisted players.void
This method does not return a value
debugEnabled
Checks if debug mode is enabled in the configuration.boolean
true if the debug config value is set to true, false otherwise