维护模式
一款现代、轻量级的 Paper 服务器维护模式插件。即时切换维护模式,或提前设置计划——支持完整的双语功能、十六进制颜色消息以及精美的服务器列表集成。
特性
-
即时或定时维护 — 使用 /maintenance on 可设置无限期的维护窗口,或使用 /maintenance on 30m <reason> 在指定时长后自动关闭维护,并附带倒计时广播。
-
重启后保持状态 — 即使服务器在维护期间重启,已设定的维护窗口也会正确恢复。
-
独立权限控制 — maintenance.admin 用于管理插件,maintenance.bypass 允许工作人员在维护期间加入服务器,而无需授予完整的命令访问权限。
-
完整本地化支持 — 消息会自动匹配每位玩家客户端的语言(内置英文和日文),并提供优雅的回退机制。
-
十六进制颜色支持 — 所有消息均支持传统的 & 颜色代码与现代的 &#RRGGBB 十六进制颜色。
-
服务器列表集成 — 为正常运行和维护状态提供可自定义的 MOTD(服务器提示消息),在维护期间隐藏玩家数量,并显示相应的维护横幅。
-
实时重载 — /maintenance reload 命令可在不重启服务器的情况下重新加载配置文件和语言文件。
-
配置自动更新 — 插件升级时会自动添加新的配置选项,且不会覆盖你现有的设置。
-
可选的 Modrinth 更新检查器 — 当有新版本可用时,会在玩家加入时通知管理员。
-
子命令与常见时长支持 Tab 补全。
命令
| 命令 |
说明 |
/maintenance on [duration] [reason] |
启用维护模式。duration 接受一个数字后跟 s、m、h 或 d(例如 30m、2h)。duration 和 reason 均为可选参数。 |
/maintenance off |
禁用维护模式。 |
/maintenance status |
显示维护模式是否处于活动状态、原因以及剩余时间。 |
/maintenance reload |
重新加载 config.yml 和语言文件。 |
/maintenance help |
显示命令列表。 |
权限
| 权限 |
默认值 |
说明 |
maintenance.admin |
op |
允许使用 /maintenance 命令。隐含 maintenance.bypass 权限。 |
maintenance.bypass |
op |
允许在维护模式启用时加入服务器。 |
配置
config.yml:
maintenance:
enabled: false
reason: ""
scheduled-end: 0
default-language: "en_us"
motd:
normal:
line1: "&aExample Server"
line2: "&7Survival &8| &f%online%&7/&f%max% &7online"
maintenance:
line1: "&aExample Server"
line2: "&cUnder maintenance - back soon!"
hide-player-count: true
version-text: "&c⚠ &4Maintenance"
broadcast:
on-enable: true
on-disable: true
countdown-warnings: true
update-checker:
enabled: true
modrinth-id: "your-project-slug"
notify-ops-on-join: true
在启用更新检查器之前,应将 update-checker.modrinth-id 设置为插件实际的 Modrinth 项目标识符(即 URL 中 /plugin/ 之后的部分)。
语言文件位于 plugins/Maintenance/lang/ 目录下(en_us.yml、ja_jp.yml),可以自由编辑或通过添加额外的语言环境来扩展——只需使用相同的键添加一个新的 <locale>.yml 文件即可。
安装
- 下载
Maintenance-<version>.jar 并将其放入服务器的 plugins 文件夹中。
- 重启服务器。
- 根据需要编辑
plugins/Maintenance/config.yml,然后运行 /maintenance reload。
要求
- Paper(或 Paper 分支)用于 Minecraft 1.21.x
- Java 21+
Maintenance
A modern, lightweight maintenance mode plugin for Paper servers. Toggle maintenance instantly, or schedule it in advance — with full bilingual support, hex-color messages, and a polished server list integration.
Features
- Instant or scheduled maintenance —
/maintenance on for an indefinite maintenance window, or /maintenance on 30m <reason> to auto-disable after a set duration, complete with countdown broadcasts.
- Survives restarts — a scheduled maintenance window resumes correctly even if the server restarts while it's active.
- Separate permissions —
maintenance.admin for managing the plugin, maintenance.bypass for letting staff join during maintenance without granting full command access.
- Full localization — messages automatically match each player's client language (English and Japanese included out of the box), with graceful fallback.
- Hex color support — every message supports both legacy
& color codes and modern &#RRGGBB hex colors.
- Server list integration — a customizable MOTD for normal and maintenance states, with the player count hidden and a maintenance banner shown in its place while maintenance is active.
- Live reload —
/maintenance reload reloads the configuration and language files without a restart.
- Self-updating config — new configuration options are automatically added when you update the plugin, without overwriting your existing settings.
- Optional Modrinth update checker — notifies operators on join when a new version is available.
- Tab completion for every subcommand and common durations.
Commands
| Command |
Description |
/maintenance on [duration] [reason] |
Enable maintenance mode. duration accepts a number followed by s, m, h, or d (e.g. 30m, 2h). Both duration and reason are optional. |
/maintenance off |
Disable maintenance mode. |
/maintenance status |
Show whether maintenance mode is active, its reason, and any remaining time. |
/maintenance reload |
Reload config.yml and the language files. |
/maintenance help |
Show the command list. |
Permissions
| Permission |
Default |
Description |
maintenance.admin |
op |
Allows use of the /maintenance command. Implies maintenance.bypass. |
maintenance.bypass |
op |
Allows joining the server while maintenance mode is enabled. |
Configuration
config.yml:
maintenance:
enabled: false
reason: ""
scheduled-end: 0
default-language: "en_us"
motd:
normal:
line1: "&aExample Server"
line2: "&7Survival &8| &f%online%&7/&f%max% &7online"
maintenance:
line1: "&aExample Server"
line2: "&cUnder maintenance - back soon!"
hide-player-count: true
version-text: "&c⚠ &4Maintenance"
broadcast:
on-enable: true
on-disable: true
countdown-warnings: true
update-checker:
enabled: true
modrinth-id: "your-project-slug"
notify-ops-on-join: true
update-checker.modrinth-id should be set to your plugin's actual Modrinth project slug (the part of the URL after /plugin/) before enabling the checker.
Language files live in plugins/Maintenance/lang/ (en_us.yml, ja_jp.yml) and can be freely edited or extended with additional locales — just add a new <locale>.yml file using the same keys.
Installation
- Download
Maintenance-<version>.jar and place it in your server's plugins folder.
- Restart the server.
- Edit
plugins/Maintenance/config.yml to taste, then run /maintenance reload.
Requirements
- Paper (or a Paper fork) for Minecraft 1.21.x
- Java 21+
评论 0
登录后参与评分
还没有评论,来抢沙发吧