Maintenance | A greatly customizable maintenance plugin

Maintenance

Version Discord

About

Maintenance is a wonderful maintenance plugin for your Minecraft server you can find. It runs on Bukkit/Spigot, BungeeCord, Sponge as well as Velocity.

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 editable via the language file, given in a multitude of different languages
  • Only want to enable maintenance on a single server? You can also do so by using the /maintenance <on/off> <servername> command
  • Link multiple proxy instances with a MySQL database connection, so you don’t have to enable/disable maintenance on each proxy by hand
  • Using ServerListPlus? Maintenance will toggle its status when enabling maintenance and reenable the SLP motd when disabling maintenance

The configuration file is shown at the bottom of this post.
Learn more about the plugin (commands, permissions, configuration, updating 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

# Enables maintenance on certain servers managed by your Bungee instance(s).
proxied-maintenance-servers:
  - SpigotServer1
# - AnotherServer

# If maintenance is enabled on a proxied server with players on it,
# they will be sent to the fallback server instead of being kicked off the network.
# If the fallback server is not reachable/not set, they will just be kicked off the network.
fallback: lobby

# 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:
  - "&cMaintenance mode!%NEWLINE%&6We will be back soon!"
# - "Other entry"

# 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: false
timerspecific-pingmessages:
  - "&cMaintenance mode!%NEWLINE%&6We will be back in %TIMER%!"
# - "Other entry"

# If set to true, the message below will be shown at 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. "&cMaintenance &7%ONLINE%&8/&7%MAX%").
enable-playercountmessage: true
playercountmessage: "&4Maintenance"

# Is shown when you move your mouse above the text at the top right corner of the server in the serverlist,
# where the playercount would normally be displayed.
playercounthovermessage: "&cCurrently under%NEWLINE%&cmaintenance"

# 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.
# Currently available are: en (English), de (German), fr (French), pt (Portuguese), es (Spanish)
language: en

# If you have 2 or more proxy instances, the database connection will make sure all proxies
# have the same maintenance status, so you won't have to enable/disable it on every proxy by hand.
mysql:
  use-mysql: false
  host: host
  port: 3306
  database: database
  username: username
  password: password
  # Requests to the database will only be made at least x seconds after the last request,
  # so there won't be a request on every single ping on a server with many players.
  #
  # Set this to 0 to make a database request on (almost) every single ping.
  # (0 is not recommended if having more than a hundred concurrent players, then I'd recommend keeping it from 10-60).
  update-interval: 15

# 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 less 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: 3
2 Likes

Thanks for porting this to Velocity - this is a neat plugin.

Is there any way we can use Unicode escape characters in the config? I haven’t been able to find a way to include \u00b3 (³) in the MOTD.

Edit: nevermind, it turns out I could paste it directly into the file.

1 Like

Maintenance 3.0.1 has been released, featuring continuation of endtimers after restarts and some bugfixes.
A full changelog can be read HERE.

Also, please don’t use the forceupdate command, but download the MaintenanceVelocity.jar file manually from the download page, as the default Maintenance.jar now only includes Spigot and Bungee, so the autoupdater will only work again when already running 3.0.1 :eyes:

Maintenance 3.0.2

  • Added config option timerspecific-pingmessages to have specific pingmessages shown when endtimers are run
    • You can also set them ingame by using /maintenance setmotd timer <index> ... instead of /maintenance setmotd <index> ... , along with /maintenance removemotd timer <index> and /maintenance motd timer
  • Fixed compatibility with the latest Velocity builds (May 7th and upwards)

Could you possibly add the feature to whitelist offline players?
That could help alot when using this :smiley:

Sadly not, I have no info about offline players on the proxy. I could do offline web lookups at Mojang, but that might not be the prettiest thing. Other than that, you can only add the uuid and name of players manually to the config

Maintenance 3.0.3 has been released - some minor feature additions and fixes.

A full changelog can be read HERE.