Maintenance - Enable maintenance mode with a custom maintenance motd and icon

This is a discussion topic for the Ore project, Maintenance. View the full project on Ore for downloads and more information.


Maintenance

About

Maintenance is the most wonderful maintenance plugin for your Minecraft server you can find.

Its features include:

  • A custom motd as well as server icon, that will be shown during maintenance
  • Start- and endtimers, which will enable/disable maintenance mode after the time is up
  • A ‘%TIMER%’ variable usable in the pingmessage, to show the time until a running endtimer finishes (other variables and tricks are explained in the configuration file’s comments)
  • A maintenance whitelist, to grant specific players the ability to join while you’re working on your server
  • Notifications when players try to join your server during maintenance
  • Nearly all messages are customizable via the language file, given in a multitude of different languages
  • Using ServerListPlus? Maintenance will toggle its status when enabling maintenance and reenable the SLP motd when disabling maintenance

An example of how a pingmessage during maintenance might look:
Pingexample

The configuration file is shown at the bottom of this post.
Learn more about the plugin (commands, permissions, configuration, and API usage) in the wiki listed below.

Support

Found a bug? Report it on the issue tracker
Other problems or questions? Click the wonderful image below!

Discord

Configuration

If the wiki is one click too far away for you, you can get a sense of some features by looking into the config.
Whitelisted players for maintenance and messages are in two other files, but here’s the config file:

# Enables maintenance mode.
maintenance-enabled: false

# The message shown in the multiplayer server list motd when maintenance is enabled.
# If you put in multiple entries, one of them will be chosen randomly on every ping.
# If running an endtimer, the time left can be displayed by including '%TIMER%' in a pingmessage (also works in playercount(-hover) message).
pingmessages:
  - "<red>Currently under maintenance<br><gradient:#fbffc2:#0fffff>We will be back soon!"
# - "Other entry"
enable-pingmessages: true

# Any extra commands inside the arrays will be executed when maintenance is enabled/disabled.
# Example: commands-on-maintenance-enable: ["say hello!", "stop"]
commands-on-maintenance-enable: []
commands-on-maintenance-disable: []

# If set to true and an endtimer is currently running, a pingmessage from this pool will be chosen
# instead of the ones above, so you can have different messages for when an endtimer is running/not running.
enable-timerspecific-messages: true
timerspecific-pingmessages:
  - "<red>Currently under maintenance<br><gradient:#fbffc2:#fffff>Come back in:</gradient> <color:#aa55ee>%TIMER%"
# - "Other entry"

# If set to true, the message below will be shown in the top right corner of the server in the serverlist, where the playercount would normally be displayed.
# If set to false, the normal playercount will be shown.
#
# Alternatively you can use '%ONLINE%' and '%MAX%' if you want to include the playercount in a custom message (e.g. "Maintenance %ONLINE%/%MAX%").
# DOES NOT SUPPORT RGB!
enable-playercountmessage: true
playercountmessage: "<dark_red>Maintenance"

# Is shown when you move your mouse above the text in the top right corner of the server in the serverlist,
# where the playercount would normally be displayed.
# DOES NOT SUPPORT RGB!
playercounthovermessage: "<red>Currently under<br><red>maintenance"

# If set to true, the server icon will be changed to the 'maintenance-icon.png' file in the plugin's folder during maintenance.
custom-maintenance-icon: false

# If set to true, players with the 'maintenance.joinnotification' permission will receive a message,
# that a player tried to join the server while maintenance is enabled.
send-join-notification: false

# Set this to false if you do not want players to be kicked when you enable maintenance (new connections will still be blocked).
# ... I don't know why you would want that, but you can disable it. :p
kick-online-players: true

# Changes the language of command feedback/messages.
# If you find missing translations or want to contribute a new language file, you are very welcome to message me on Spigot or my Discord server! :)
# Currently available are: en (English), de (German), fr (French), pt (Portuguese), es (Spanish), ru (Russian), zh (Chinese), it (Italian), pl (Polish)
language: en

# If enabled and the server is restarted while running an endtimer, the timer will be continued after the restart.
# If the timer ends while the server is offline, maintenance will be disabled as soon as the server starts again.
continue-endtimer-after-restart:
  enabled: false
  # This value is set everytime an endtimer is started, cancelled or ended.
  # Do not manually change this value.
  end: 0

# If using the timer command: In what intervalls before enabling/disabling maintenance there will be a broadcast.
timer-broadcast-for-seconds: [1200, 900, 600, 300, 120, 60, 30, 20, 10, 5, 4, 3, 2, 1]

# If disabled, you will no longer receive any messages if there is an update.
# Not recommended to disable, as new versions generally tend to run better and with fewer bugs.
# However, you can always check for updates manually using the '/maintenance update' command.
update-checks: true

# Used for autoupdating the config, do not change this value.
config-version: 6

External site access

By default, the plugin checks for updates (with Spigot’s version api) on startup as well as on the first join per startup of a player with the maintenance.admin permission. To disable these, set the update-checks value in the config to false.

For issues or other problems I usually ask for your /maintenance dump output - this command will generate a dump with general information about your server, setup, and plugins. An example can be seen here. It includes platform name and version, all of your config settings (except anything in your mysql section; use-mysql and update-interval are manually taken out, the rest ignored), as well as a list of all of your plugins. The dump will be uploaded to https://hasteb.in/ and in theory, anyone with the link can view your dump publicly.

A new version has been released for Maintenance, it is available for download here.


3.0.5 - June 17th 2020

The old plugin versions have been moved to https://ore.spongepowered.org/KennyTV/MaintenanceSponge/. This page (https://ore.spongepowered.org/KennyTV/Maintenance/) has been newly recreated because of the identifier change.

Changed

  • The plugin identifier is now maintenance instead of maintenancesponge
    • The plugin config directory will automatically be renamed accordingly when starting the server
  • Added Chinese language file (thanks to Spigot user yeban)
  • Added Italian language file (thanks to TheViperShow)
  • Updated Russian language file (thanks to Spigot user En_0t_S)

Fixed

  • Fixed disabling the playercount-message still hiding online/max players
  • Fixed config parsing with multi line strings

A full changelog for all platforms can be found here, the list above only includes changes that affect the Sponge module.

A new version has been released for Maintenance, it is available for download here.


3.0.6 - February 17th 2021

Changed

  • Added maintenance schedule <minutes> <duration> command
    • This starts a timer for maintenance to be enabled, after which another timer will be started to disable it again (in contrast to starttimer and endtimer, which each only do one of)
  • Added command alias mt for the Maintenance command
  • Added secret argument to the whitelist add command: You can use maintenance add <uuid> <name> to add offline entries per command
  • The maintenance’s base command is now properly registered with a permission on each platform, so that it is excluded from tabcomplection to unauthorized players
  • Some improvements to the French language file (thanks to @Aurelien30000)

A new version has been released for Maintenance, it is available for download here.


3.0.7 - August 17th 2021

Changed

  • Added config options commands-on-maintenance-enable and commands-on-maintenance-disable to define commands to be executed after maintenance has been toggled
  • Added config option enable-pingmessages to can change whether a custom maintenance motd should be displayed during maintenance
  • Added language fields scheduletimerBroadcast and singleScheduletimerBroadcast with the variables %SERVER%, %TIME%, and %DURATION% instead of using the normal starttimer broadcasts

Fixed

  • Fixed missing language key warning for the debug command

A new version has been released for Maintenance, it is available for download here.


4.0.0 - March 17th 2022

Changed

  • Added support for hex colors in messages and replaced the component parsing with adventure-minimessage
    • This means that section symbols (§) are no longer the intended/supported format
    • You can use the following page to edit and preview formatted text: https://webui.adventure.kyori.net/
    • You can find full documentation on the format (including normal colors and formatting, rgb, click/hover events, and more) here: Format - Adventure Documentation (v4.10.1)
    • Your config and language file will mostly be updated to the new format automatically, you won’t have to change anything manually except for the %NEWLINE% variable to <br>. You might still benefit from letting new config and language files generate.
    • Note that the player count and player count hover messages do not support rgb colors
  • Updated Sponge module to SpongeAPI v8 (Minecraft 1.15+)
  • Changed %NEWLINE% replacement to <br>
  • Changed enable-timerspecific-messages to default to true in newly generated config files
  • Added prefix entry in language file to use the placeholder <prefix> instead of copy-pasting the actual prefix every time
  • Added singleServerMaintenanceListEntry language string
  • Added Polish translations (thanks to Slasherss1)
  • Updated French translations (thanks to Aurelien30000)
  • Updated Spanish translations (thanks to Jaximo)
  • If you were using the MaintenanceAddon, you need to update it to version 1.2.0

Fixed

  • Fixed missing language key warning for the scheduletimer command
  • Fixed typo in singleServerMaintenanceListEmpty default language string
  • Fixed typo in language key whitelistEmpty in the German language file (by Ceddix)

A new version has been released for Maintenance, it is available for download here.


  • Fixed the config sometimes breaking on saving/upgrading
    • If it has already been broken for you, you might have to delete your old config to let it regenerate properly