关于此插件
本插件允许您在 Paper、Velocity、Bungee 和 Sponge 服务器上启用维护模式,从而阻止没有相应权限的玩家加入服务器。
本插件使用 MiniMessage 作为组件文本格式。
不支持旧版文本格式 (§a/&a)
- 使用 预览解析后的组件
- 您可以在此处找到该格式的完整文档(包括普通颜色和格式化、RGB、点击/悬停事件等):
其功能包括:
- 自定义 motd 以及 服务器图标,将在维护期间显示
- 开始和结束计时器,将在时间到期后 启用/禁用维护模式
- 计划计时器,将在给定时间后启用维护模式,然后禁用它
- '%TIMER%' 变量可用于 pingmessage,以显示运行中的结束计时器完成所需的时间 (其他变量和技巧在配置文件的注释中有说明)
- 维护白名单,授予特定玩家在您进行服务器维护时加入的能力
- 当玩家尝试在维护期间加入服务器时发送通知
- 几乎所有 消息均可通过语言文件编辑,提供多种不同语言
Velocity/Bungee 的附加功能:
- 只想在 单个服务器 上启用 维护模式?您也可以使用
/maintenance <on/off> <servername> 命令来实现
- 通过 MySQL 数据库连接链接 多个代理实例,这样您就不必手动在每个代理上启用/禁用维护模式
- 在全代理维护期间的 等待服务器,以及在单个代理服务器处于维护状态时的 回退服务器
- 使用 ServerListPlus?启用维护时将切换其状态,禁用维护时将重新启用 SLP motd
- 想在 Paper 上使用 PlaceholderAPI 占位符?请参阅 此处 获取有关 MaintenanceAddon 的更多信息。
想知道一个秘密吗?
您可以通过在 playercountmessage 中添加大量空格来让文本位于 服务器图标左侧,如下所示:
playercountmessage: "Maintenance AAAA"
重要提示:如果在 Paper 服务器上使用此插件,则需要 ProtocolLib 插件才能充分发挥 Maintenance 的功能。
问题/支持
发现了 bug?请使用 问题追踪器
其他问题或困难?加入支持 Discord 群组 ✨
德国插件教程
@YouTube
命令
<> 中的参数是必需的,[] 中的不是必需的(可以省略)。
- /maintenance <on/off> [server] 将设置维护模式的状态
- /maintenance reload 重新加载配置和维护图标文件
- /maintenance <add/remove> <player/uuid> 允许特定玩家在维护启用时加入服务器
- /maintenance whitelist 返回所有在
- 维护白名单上的玩家列表
- /maintenance starttimer [server] <minutes> 将在时间到期后启用维护模式
- /maintenance endtimer [server] <minutes> 将在给定的分钟数内启用维护模式。时间到期后,它将再次被禁用
- /maintenance schedule [server] <minutes> <minutesToEnd> 将在给定时间后启用维护模式,然后根据第二个参数禁用它
- /maintenance aborttimer 取消正在运行的开始/结束计时器
- /maintenance setmotd <index> <1/2> <message> 为维护模式设置 motd
- /maintenance motd 列出当前设置的维护 motds
- /maintenance update 远程下载插件的最新版本到您的服务器
- /maintenance dump 转储一些服务器信息,用于 bug 报告
权限
- maintenance.admin - 超级权限,授予访问以下所有权限
- maintenance.bypass - 在维护期间加入服务器
- maintenance.command - 使用 "/maintenance" 命令(也需要使用子命令)
- maintenance.toggle - 使用 "/maintenance <on/off>" 命令
- maintenance.reload - 使用 "/maintenance reload" 命令
- maintenance.update - 使用 "/maintenance <update/forceupdate>" 命令
- maintenance.timer - 使用 "/maintenance <starttimer/endtimer> <minutes>" 和 "/maintenance timer abort" 命令
- maintenance.whitelist.add - 使用 "/maintenance add <player>" 命令
- maintenance.whitelist.remove - 使用 "/maintenance remove <player>" 命令
- maintenance.whitelist.list - 使用 "/maintenance whitelist" 命令
- maintenance.setmotd - 使用 "/maintenance setmotd <index> <1/2> <message>" 命令
- maintenance.motd - 使用 "/maintenance motd" 命令
- maintenance.dump - 使用 "/maintenance dump" 命令
- maintenance.joinnotification - 如果启用:当玩家尝试在维护启用时加入服务器时向您发送通知
Velocity/Bungee 部分的额外权限:
- maintenance.singleserver.bypass.<server> - 在维护期间加入代理服务器
- maintenance.singleserver.toggle - 使用 "/maintenance <on/off> <server>" 命令
- maintenance.singleserver.timer - 使用 "/maintenance <starttimer/endtimer> <server> <minutes>" 和 "/maintenance timer abort <server>" 命令
- maintenance.singleserver.status - 使用 "/maintenance status" 命令
重要提示 - 如果您在代理服务器上使用该插件:您必须在代理服务器而非后端服务器上拥有这些权限!最好的方法是在代理上使用适当的权限插件(例如 LuckPerms)。
配置
如果您使用的是 插件的 Paper 版本,您需要安装 ProtocolLib 才能使用自定义服务器图标和玩家计数消息(或者您的 Paper 运行在 1.12.2 或更高版本)!其余功能则无需此插件即可访问。
对于 Velocity/Bungee 版本,您不需要安装任何其他插件。
proxied-maintenance-servers、fallback 和 mysql 部分仅适用于 Velocity/Bungee 版本。
# 启用维护模式。
maintenance-enabled: false
# 在您代理实例管理的某些服务器上启用维护。
proxied-maintenance-servers:
- PaperServer1
# - AnotherServer
# 如果启用了带有玩家的代理服务器的维护,他们将被发送到回退服务器,而不是被踢出网络。
# 如果回退服务器不可达或未设置,他们将被直接踢出网络。
# 这也可以设置为数组以设置多个回退服务器,以防一个服务器并非始终可达:'fallback: [s1, s2, s3, ...]'
fallback: lobby
# 如果全局启用了维护,您可以定义一个“等待”大厅,将玩家发送到这里而不是被踢出。
# 留空以禁用。
waiting-server: ""
# 当启用维护时,在多人服务器列表 motd 中显示的消息。
# 如果您输入多个条目,每次 ping 时会随机选择其中一个。
# 如果正在运行结束计时器,可以通过在 pingmessage 中包含 '%TIMER%' 来显示剩余时间(在 playercount(-hover) 消息中也有效)。
pingmessages:
- "<red>当前正在进行维护<br><gradient:#fbffc2:#0fffff>我们很快回来!"
# - "Other entry"
enable-pingmessages: true
# 数组内的任何额外命令将在启用/禁用维护时执行。
# 示例:commands-on-maintenance-enable: ["say hello!", "stop"]
commands-on-maintenance-enable: []
commands-on-maintenance-disable: []
# 如果设置为 true 并且当前正在运行结束计时器,将从此池中选择一条 pingmessage
# 而不是上面的那些,因此您可以在运行/不运行结束计时器时使用不同的消息。
enable-timerspecific-messages: true
timerspecific-pingmessages:
- "<red>当前正在进行维护<br><gradient:#fbffc2:#fffff>请在以下时间后回来:</gradient> <color:#aa55ee>%TIMER%"
# - "Other entry"
# 如果设置为 true,下面的消息将显示在服务器列表中的服务器右上角,通常显示玩家计数的位置。
# 如果设置为 false,将显示正常的玩家计数。
#
# 另外,您可以在自定义消息中包含 '%ONLINE%' 和 '%MAX%'(例如 "Maintenance %ONLINE%/%MAX%")。
# 不支持 RGB!
enable-playercountmessage: true
playercountmessage: "<dark_red>维护中"
# 当您将鼠标悬停在服务器列表中的服务器右上角文本上时显示,
# 通常显示玩家计数的位置。
# 不支持 RGB!
playercounthovermessage: "<red>当前正在进行<br><red>维护"
# 如果设置为 true,在维护期间,服务器图标将更改为插件文件夹中的 'maintenance-icon.png' 文件。
custom-maintenance-icon: false
# 如果设置为 true,具有 'maintenance.joinnotification' 权限的玩家将收到一条消息,
# 表明有玩家尝试在启用维护时加入服务器。
send-join-notification: false
# 如果您不希望玩家在启用维护时被踢出,请将其设置为 false(新连接仍会被阻止)。
# ... 我不知道您为什么想要这样,但您可以禁用它。 :p
kick-online-players: true
# 更改命令反馈/消息的语言。
# 如果您发现缺少翻译或想贡献新的语言文件,非常欢迎您在 Paper 论坛或我的 Discord 服务器上联系我! :)
# 目前可用的有:en (English), de (German), fr (French), pt (Portuguese), es (Spanish), ru (Russian), zh (Chinese), it (Italian), pl (Polish)
language: en
# 如果您有 2 个或更多代理实例,数据库连接将确保所有代理
# 具有相同的维护状态,因此您不必手动在每个代理上启用/禁用它。
mysql:
use-mysql: false
host: host
port: 3306
database: database
username: username
password: password
# 对数据库的请求只有在距离上次请求至少 x 秒后才会发出,
# 因此在具有大量玩家的服务器上,不会在每次 ping 时都发出请求。
#
# 设置为 0 以在(几乎)每次 ping 时都发出数据库请求。
# (如果并发玩家超过一百人,不建议设置为 0,建议保持在 10-60 之间)。
update-interval: 15
# 如果您由于某些原因无法与数据库建立 SSL 连接,可以在这里禁用它(不建议)。
use-ssl: true
# 如果启用并且在运行结束计时器时重启服务器,计时器将在重启后继续。
# 如果计时器在服务器离线时结束,一旦服务器再次启动,维护将自动禁用。
continue-endtimer-after-restart:
enabled: false
# 每次开始、取消或结束结束计时器时都会设置此值。
# 请勿手动更改此值。
end: 0
# 如果使用计时器命令:在启用/禁用维护之前多少秒内会有广播。
timer-broadcast-for-seconds: [1200, 900, 600, 300, 120, 60, 30, 20, 10, 5, 4, 3, 2, 1]
如果禁用此选项,当有新版本时您将不再收到任何通知。
不建议禁用,因为新版本通常运行更稳定且错误更少。
不过,您始终可以使用 '/maintenance update' 命令手动检查更新。
update-checks: true
用于配置自动更新,请勿更改此值。
config-version: 6
```yaml
# 包含占位符 "<prefix>" 的消息将使用以下字符串替换该占位符
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
noPermission: "<red>您没有执行该命令的权限。"
kickmessage: "<red>服务器当前正在进行维护!<br>请稍后再试!"
maintenanceActivated: "<prefix><gold>维护模式现已激活。"
maintenanceDeactivated: "<prefix><gold>维护模式现已停用。"
alreadyEnabled: "<prefix><red>维护功能已启用!"
alreadyDisabled: "<prefix><red>维护功能已停用!"
endtimerBroadcast: "<prefix><gray>维护模式将在 <gold>%TIME%<gray> 后停用。"
endtimerStarted: "<prefix><green>计时器已启动:<gray>维护模式将在 <gold>%TIME%<gray> 后停用。"
starttimerBroadcast: "<prefix><gray>维护模式将在 <gold>%TIME%<gray> 后启用。"
starttimerStarted: "<prefix><green>计时器已启动:<gray>维护模式将在 <gold>%TIME%<gray> 后启用。"
scheduletimerBroadcast: "<prefix><gray>维护模式将在 <gold>%TIME% <gray>后启用,并持续 <gold>%DURATION%<gray>。"
timerAlreadyRunning: "<prefix><red>已有计时的任务在运行中!"
timerNotRunning: "<prefix><red>当前没有正在运行的计时器。"
timerCancelled: "<prefix><red>当前的计时器已被取消。"
timerTooLong: "<prefix><red>数值必须小于 40320(28天)!"
timerMotdDisabled: "<prefix><red>如果您想使用/编辑特定于计时器的 MOTD,必须在配置中将 'enable-timerspecific-messages' 设置为 'true'。"
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
motdTimerNotRunning: "-"
joinNotification: "<prefix><yellow>%PLAYER% <red>尝试加入服务器。"
motdList: "<prefix><gray>您的维护 MOTD 列表:"
motdListEmpty: "<prefix><red>您未设置任何维护 MOTD!"
reload: "<prefix><green>已重新加载配置文件、白名单玩家、语言文件和维护图标。"
removedMotd: "<prefix><green>已移除第 %INDEX% 号 MOTD。"
removeMotdError: "<prefix><red>您只有一个 MOTD,因此无法删除任何内容!"
setMotd: "<prefix><green>已将第 %INDEX% 个维护 MOTD 的第 %LINE% 行设置为 %MOTD%"
setMotdIndexError: "<prefix><red>您当前有 %MOTDS% 个 MOTD,因此必须选择 1 到 %NEWAMOUNT% 之间的数字。"
setMotdLineError: "<prefix><red>第二个参数必须是行号(1 或 2)!"
updateDownloading: "<prefix><red><bold>正在下载更新..."
updateFailed: "<prefix><dark_red><bold>更新失败!"
updateFinished: "<prefix><green><bold>更新成功!为防止任务出现问题并完成更新,您需要重启服务器!"
whitelistedPlayers: "<prefix><gold>维护模式下的白名单玩家:"
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
whitelistAdded: "<prefix><green>已将 <aqua>%PLAYER% <green>添加到维护白名单!"
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>已在维护白名单中!"
whitelistRemoved: "<prefix><green>已从维护白名单中移除 <aqua>%PLAYER% <green>。"
whitelistNotFound: "<prefix><red>该玩家不在维护白名单中!"
whitelistEmpty: "<prefix><red>维护白名单为空!请使用 <yellow>/maintenance add <player/uuid> <red>来添加人员!"
playerNotFound: "<prefix><red>此前没有名为此名称的玩家在此服务器上玩过。"
playerNotFoundUuid: "<prefix><red>找不到具有该 UUID 的玩家。"
playerNotOnline: "<prefix><red>当前在线玩家中没有名为此名称的玩家。"
invalidUuid: "<prefix><red>无效的 UUID 格式!"
# Bungee/Velocity 部分的消息,如果您仅在 Paper/Sponge 上使用插件,可以忽略它们
sentToWaitingServer: "<prefix><red>您已被传送至等待服务器!"
forceWaitingServer: "<prefix><red>在维护启用期间,您无法离开等待服务器!"
serverNotFound: "<prefix><red>代理上没有注册此名称的服务器!"
singleTimerAlreadyRunning: "<prefix><red>该服务器已有计时的任务在运行中!"
singleTimerCancelled: "<prefix><red>服务器 <yellow>%SERVER% <red>的当前计时器已被取消。"
singleTimerNotRunning: "<prefix><red>该服务器当前没有正在运行的计时器。"
singleEndtimerBroadcast: "<prefix><gray>服务器 %SERVER% 上的维护模式将在 <gold>%TIME%<gray> 后停用。"
singleStarttimerBroadcast: "<prefix><gray>服务器 %SERVER% 上的维护模式将在 <gold>%TIME%<gray> 后启用。"
singleScheduletimerBroadcast: "<prefix><gray>服务器 %SERVER% 上的维护模式将在 <gold>%TIME% <gray>后启用,并持续 <gold>%DURATION%<gray>。"
singleMaintenanceKick: "<prefix><red>服务器 %SERVER% 当前正在进行维护!请稍后再试!"
singleMaintenanceKickComplete: "<red>服务器 %SERVER% 正在进行维护!<br>您可以尝试重新连接以进入其他服务器!"
singleMaintenanceActivated: "<prefix><gold>服务器 <yellow>%SERVER%<gold> 上的维护模式现已激活。"
singleMaintenanceDeactivated: "<prefix><gold>服务器 <yellow>%SERVER%<gold> 上的维护模式现已停用。"
singleServerAlreadyEnabled: "<prefix><red>服务器 <yellow>%SERVER%<red> 上的维护功能已启用!"
singleServerAlreadyDisabled: "<prefix><red>服务器 <yellow>%SERVER%<red> 上的维护功能已停用!"
singleServerMaintenanceList: "<prefix><gray>已启用维护模式的代理服务器:"
singleServerMaintenanceListEmpty: "<prefix><gray>没有处于维护状态的代理服务器。"
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
second: "秒"
seconds: "秒"
minute: "分钟"
minutes: "分钟"
hour: "小时"
hours: "小时"
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
helpPageNotFound: "<prefix><red>没有该页码的页面!"
helpNextPage: "<gray>使用 <aqua>/maintenance help %PAGE% <gray>以查看下一页帮助窗口。"
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(如果正在运行,将中止当前的计时器)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <gray>(经过指定的分钟数后,维护模式将被禁用)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <gray>(经过指定的分钟数后,维护模式将被启用)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(经过指定的分钟数后,维护模式将在指定的持续时间内启用)"
helpDebug: "<gold>/maintenance debug <gray>(启用一些调试日志记录)"
helpDump: "<gold>/maintenance dump <gray>(转储一些服务器信息,用于错误报告)"
helpHelp: "<gold>/maintenance help [page] <gray>(显示此精美的帮助窗口)"
helpMotd: "<gold>/maintenance motd [timer] <gray>(列出当前设置的维护 MOTD。如果指定了“timer”,则显示计时器特定的 MOTD)"
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(移除一个维护 MOTD。如果使用“timer”作为参数,将移除计时器特定的 ping 消息)"
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <gray>(设置维护模式的 MOTD。如果使用“timer”作为参数,将设置计时器特定的 ping 消息)"
helpReload: "<gold>/maintenance reload <gray>(重新加载配置文件、白名单文件和服务器图标)"
helpToggle: "<gold>/maintenance <on/off> <gray>(启用/禁用维护模式)"
helpUpdate: "<gold>/maintenance update <gray>(远程下载插件的最新版本到服务器上)"
helpWhitelist: "<gold>/maintenance whitelist <gray>(显示所有维护模式的白名单玩家)"
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <gray>(将玩家添加到维护白名单中,即使启用了维护模式,他们也可以加入服务器)"
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <gray>(从维护白名单中移除玩家)"
# Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(如果正在运行,将中止当前的计时器)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <gray>(经过指定的分钟数后,维护模式将被禁用)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <gray>(经过指定的分钟数后,维护模式将被启用)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(经过指定的分钟数后,维护模式将在指定的持续时间内启用)"
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(启用/禁用维护模式)"
helpStatus: "<gold>/maintenance status <gray>(列出所有当前处于维护状态的代理服务器)"
# Used for autoupdating the language file, do not change this value.
language-version: 1
ServerListPlus Integration
If you have the ServerListPlus plugin on your server, Maintenance will toggle its status. If you enable maintenance, the ServerListPlus motd will be disabled and then reenabled, when you disable maintenance to prevent any issues with them overriding each other.
MySQL/Multi-Proxy Support
Only available in the Bungee/Velocity version!
By enabling MySQL in the config, you can even connect multiple proxy-servers to a set value in your database, so you won't have to enable/disable maintenance on each proxy by hand!
I want to give a small thank you to the people translating messages - you're awesome!
French: Zendrique
Spanish: Vixo_Ulises
Polish: Slasherss and EEEGuba
Portuguese: JoaoPinto
Russian: En_0t_S
Chinese: yeban
About This Plugin
This plugin lets you activate a maintenance mode on your Paper, Velocity, Bungee, and Sponge server, which will prevent players without a permission to join the server.
This plugin uses MiniMessage as the component text format.
LEGACY TEXT FORMATTING (§a/&a) IS NOT SUPPORTED
- Use to preview parsed components
- You can find full documentation on the format (including normal colors and formatting, rgb, click/hover events, and more) here:
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
- Schedule timers, which will enable maintenance, then disable it after a given amount of time
- 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
Additional features on Velocity/Bungee:
- 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
- Waiting servers during full proxy maintenance, as well as fallback servers to go to when a single proxied server is under maintenance
- Using ServerListPlus? Maintenance will toggle its status when enabling maintenance and reenable the SLP motd when disabling maintenance
- Want to have PlaceholderAPI placeholders on Paper? See here for more information on the MaintenanceAddon.
Want to know a secret?
You can have text left of the server icon by just adding a lot of spaces to the playercountmessage, like so:
playercountmessage: "Maintenance AAAA"
IMPORTANT: If using the plugin on a Paper server, the plugin ProtocolLib is required to use Maintenance to its full extend.
Issues/Support
Did you find a bug? Use the issue tracker
Other questions or problems? Join the support Discord guild ✨
German Plugin Tutorial
@YouTube
Commands
Arguments in < > are necessary, those in [ ] aren't (can be omitted).
- /maintenance <on/off> [server] will set the status of the maintenance mode
- /maintenance reload reloads the config and maintenance-icon file
- /maintenance <add/remove> <player/uuid> allows specific players to join on the server when maintenance is enabled
- /maintenance whitelist returns a list of all players on the
- maintenance whitelist
- /maintenance starttimer [server] <minutes> will enable maintenance mode after the time is up
- /maintenance endtimer [server] <minutes> will enable maintenance mode for the given time in minutes. After the time is up, it'll be disabled again
- /maintenance schedule [server] <minutes> <minutesToEnd> will enable maintenance mode after the given time, then disable it according to the second parameter
- /maintenance aborttimer cancels a running start-/endtimer
- /maintenance setmotd <index> <1/2> <message> sets a motd for maintenance mode
- /maintenance motd lists the currently set maintenance motds
- /maintenance update remotely downloads the newest version of the plugin onto your server
- /maintenance dump dumps some server information, used for bug reports
Permissions
- maintenance.admin - super permission, that grants access to all perms below
- maintenance.bypass - join the server during maintenance
- maintenance.command - use the "/maintenance" command (also required to use the subcommands)
- maintenance.toggle - use the "/maintenance <on/off>" commands
- maintenance.reload - use the "/maintenance reload" command
- maintenance.update - use the "/maintenance <update/forceupdate>" commands
- maintenance.timer - use the "/maintenance <starttimer/endtimer> <minutes>" and "/maintenance timer abort" commands
- maintenance.whitelist.add - use the "/maintenance add <player>" command
- maintenance.whitelist.remove - use the "/maintenance remove <player>" command
- maintenance.whitelist.list - use the "/maintenance whitelist" command
- maintenance.setmotd - use the "/maintenance setmotd <index> <1/2> <message>" command
- maintenance.motd - use the "/maintenance motd" command
- maintenance.dump - use the "/maintenance dump" command
- maintenance.joinnotification - if enabled: sends a notification to you if a player tries to join the server while maintenance is enabled
Extra permissions for the Velocity/Bungee part:
- maintenance.singleserver.bypass.<server> - join the proxied server during maintenance
- maintenance.singleserver.toggle - use the "/maintenance <on/off> <server>" commands
- maintenance.singleserver.timer - use the "/maintenance <starttimer/endtimer> <server> <minutes>" and "/maintenance timer abort <server>" commands
- maintenance.singleserver.status - use the "/maintenance status" command
IMPORTANT - If you are using the plugin on your proxyserver: You have to have these permissions on the proxy, not on the backend servers! The best way of doing this is using a proper permissions plugin on the proxy (for example LuckPerms).
Configuration
If you are using the Paper version of the plugin, you have to have ProtocolLib installed to use the custom server-icon and the playercount-messages (that, or you have Paper running on 1.12.2 or higher)! The rest however is also accessible without it.
For the Velocity/Bungee version you don't need to have any other plugins installed.
proxied-maintenance-servers, fallback and mysql section are only for the Velocity/Bungee version.
# Enables maintenance mode.
maintenance-enabled: false
# Enables maintenance on certain servers managed by your proxy instance(s).
proxied-maintenance-servers:
- PaperServer1
# - 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.
# This can also be set to an array to set multiple fallback servers, in case one server is not always reachable: 'fallback: [s1, s2, s3, ...]'
fallback: lobby
# If maintenance is enabled globally, you can define a "waiting" lobby for players to be sent to instead of being kicked.
# Leave this empty to disable.
waiting-server: ""
# 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 the Paper forums 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 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 you for some reason cannot establish SSL connections to your database, you may disable it here (not recommended).
use-ssl: true
# 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
# Messages containing the placeholder "<prefix>" will have it replaced with the following string
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
noPermission: "<red>You do not have the permission to execute that command."
kickmessage: "<red>The server is currently under maintenance!<br>Try again later!"
maintenanceActivated: "<prefix><gold>Maintenance mode is now activated."
maintenanceDeactivated: "<prefix><gold>Maintenance mode is now deactivated."
alreadyEnabled: "<prefix><red>Maintenance is already enabled!"
alreadyDisabled: "<prefix><red>Maintenance is already disabled!"
endtimerBroadcast: "<prefix><gray>Maintenance mode will be disabled in <gold>%TIME%<gray>."
endtimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode will be deactivated in <gold>%TIME%<gray>."
starttimerBroadcast: "<prefix><gray>Maintenance mode will be enabled in <gold>%TIME%<gray>."
starttimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode will be activated in <gold>%TIME%<gray>."
scheduletimerBroadcast: "<prefix><gray>Maintenance mode will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
timerAlreadyRunning: "<prefix><red>There is already a timer scheduled!"
timerNotRunning: "<prefix><red>There is currently no running timer."
timerCancelled: "<prefix><red>The current timer has been disabled."
timerTooLong: "<prefix><red>The number has to be less than 40320 (28 days)!"
timerMotdDisabled: "<prefix><red>You have to set 'enable-timerspecific-messages' in the config to 'true', if you want to use/edit timerspecific motds."
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
motdTimerNotRunning: "-"
joinNotification: "<prefix><yellow>%PLAYER% <red>tried to join the server."
motdList: "<prefix><gray>List of your maintenance motds:"
motdListEmpty: "<prefix><red>You don't have any maintenance motds set!"
reload: "<prefix><green>Reloaded config, whitelistedplayers, language file and the maintenance icon."
removedMotd: "<prefix><green>Removed motd number %INDEX%."
removeMotdError: "<prefix><red>You only have one motd, so you cannot remove any!"
setMotd: "<prefix><green>Set line %LINE% of the %INDEX%. maintenance motd to %MOTD%"
setMotdIndexError: "<prefix><red>You currently have %MOTDS% motds, so you have to pick a number between 1 and %NEWAMOUNT%."
setMotdLineError: "<prefix><red>The second argument has to be the line number (1 or 2)!"
updateDownloading: "<prefix><red><bold>Downloading update..."
updateFailed: "<prefix><dark_red><bold>Update failed!"
updateFinished: "<prefix><green><bold>The update was successful! To prevent issues with tasks and to complete the update, you have to restart the server!"
whitelistedPlayers: "<prefix><gold>Whitelisted players for maintenance:"
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
whitelistAdded: "<prefix><green>Added <aqua>%PLAYER% <green>to the maintenance whitelist!"
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>already is in the maintenance whitelist!"
whitelistRemoved: "<prefix><green>Removed <aqua>%PLAYER% <green>from the maintenance whitelist!"
whitelistNotFound: "<prefix><red>This player is not in the maintenance whitelist!"
whitelistEmpty: "<prefix><red>The maintenance whitelist is empty! Use <yellow>/maintenance add <player/uuid> <red>to add someone!"
playerNotFound: "<prefix><red>No player with this name has played on this server before."
playerNotFoundUuid: "<prefix><red>No player with that uuid could be found."
playerNotOnline: "<prefix><red>There is no player online with that name."
invalidUuid: "<prefix><red>Invalid uuid format!"
# Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
sentToWaitingServer: "<prefix><red>You have been sent to a waiting server!"
forceWaitingServer: "<prefix><red>You cannot leave the waiting server while maintenance is enabled!"
serverNotFound: "<prefix><red>No server with this name is registered on the proxy!"
singleTimerAlreadyRunning: "<prefix><red>There is already a timer scheduled for that server!"
singleTimerCancelled: "<prefix><red>The current timer for server <yellow>%SERVER% <red>has been disabled."
singleTimerNotRunning: "<prefix><red>There is currently no running timer for that server."
singleEndtimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be disabled in <gold>%TIME%<gray>."
singleStarttimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME%<gray>."
singleScheduletimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
singleMaintenanceKick: "<prefix><red>The server %SERVER% is currently under maintenance! Try again later!"
singleMaintenanceKickComplete: "<red>The server %SERVER% is under maintenance!<br>You may try to rejoin to go onto another server!"
singleMaintenanceActivated: "<prefix><gold>Maintenance mode is now activated on server <yellow>%SERVER%<gold>."
singleMaintenanceDeactivated: "<prefix><gold>Maintenance mode is now deactivated on server <yellow>%SERVER%<gold>."
singleServerAlreadyEnabled: "<prefix><red>Maintenance is already enabled on server <yellow>%SERVER%<red>!"
singleServerAlreadyDisabled: "<prefix><red>Maintenance is already disabled on server <yellow>%SERVER%<red>!"
singleServerMaintenanceList: "<prefix><gray>Proxied servers, that have maintenance enabled:"
singleServerMaintenanceListEmpty: "<prefix><gray>There are no proxied servers that are under maintenance."
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
second: "second"
seconds: "seconds"
minute: "minute"
minutes: "minutes"
hour: "hour"
hours: "hours"
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
helpPageNotFound: "<prefix><red>There is no page with that number!"
helpNextPage: "<gray>Use <aqua>/maintenance help %PAGE% <gray>to get to the next help window."
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(If running, the current timer will be aborted)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <gray>(After the given time in minutes, maintenance mode will be disabled)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <gray>(After the given time in minutes, maintenance mode will be enabled)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
helpDebug: "<gold>/maintenance debug <gray>(Enables some debug logging)"
helpDump: "<gold>/maintenance dump <gray>(Dumps some server information, used for bug reports)"
helpHelp: "<gold>/maintenance help [page] <gray>(Shows this beautiful help window)"
helpMotd: "<gold>/maintenance motd [timer] <gray>(Lists the currently set maintenance motds. If specifying 'timer', the timer motds are shown)"
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(Removes a maintenance motd. If using 'timer' as an argument, a timerspecific pingmessage will be removed)"
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <gray>(Sets a motd for maintenance mode. If using 'timer' as an argument, a timerspecific pingmessage will be set)"
helpReload: "<gold>/maintenance reload <gray>(Reloads the config file, whitelist file and the server-icon)"
helpToggle: "<gold>/maintenance <on/off> <gray>(Enables/disables maintenance mode)"
helpUpdate: "<gold>/maintenance update <gray>(Remotely downloads the newest version of the plugin onto your server)"
helpWhitelist: "<gold>/maintenance whitelist <gray>(Shows all whitelisted players for the maintenance mode)"
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <gray>(Adds the player to the maintenance whitelist, so they can join the server even though maintenance is enabled)"
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <gray>(Removes the player from the maintenance whitelist)"
# Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(If running, the current timer will be aborted)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <gray>(After the given time in minutes, maintenance mode will be disabled)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <gray>(After the given time in minutes, maintenance mode will be enabled)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(Enables/disables maintenance mode)"
helpStatus: "<gold>/maintenance status <gray>(Lists all proxied servers, that are currently under maintenance)"
# Used for autoupdating the language file, do not change this value.
language-version: 1
ServerListPlus Integration
If you have the ServerListPlus plugin on your server, Maintenance will toggle its status. If you enable maintenance, the ServerListPlus motd will be disabled and then reenabled, when you disable maintenance to prevent any issues with them overriding each other.
MySQL/Multi-Proxy Support
Only available in the Bungee/Velocity version!
By enabling MySQL in the config, you can even connect multiple proxy-servers to a set value in your database, so you won't have to enable/disable maintenance on each proxy by hand!
I want to give a small thank you to the people translating messages - you're awesome!
French: Zendrique
Spanish: Vixo_Ulises
Polish: Slasherss and EEEGuba
Portuguese: JoaoPinto
Russian: En_0t_S
Chinese: yeban
评论 0
登录后参与评分
还没有评论,来抢沙发吧