feat: add maintenance mode
This commit is contained in:
@@ -84,6 +84,7 @@ help:
|
||||
repair: " &f/repair &7- Repair held or all items"
|
||||
admin: " &f/essc admin &7- Toggle admin mode"
|
||||
tpsbar: " &f/tpsbar [player] &7- Toggle TPS boss bar"
|
||||
maintenance: " &f/maintenance <on|off|status|reload> &7- Manage maintenance mode"
|
||||
|
||||
blocks-menu:
|
||||
title: "&6&lEssentialsC &8- &e&lShortcut Menu"
|
||||
@@ -170,3 +171,14 @@ mobdrops-menu:
|
||||
name: "&dEnderman Drops"
|
||||
status: "&7Current status: {status}"
|
||||
toggle: "&eClick to toggle"
|
||||
|
||||
maintenance:
|
||||
status:
|
||||
enabled: "&cEnabled"
|
||||
disabled: "&aDisabled"
|
||||
messages:
|
||||
enabled: "&aMaintenance mode enabled."
|
||||
disabled: "&cMaintenance mode disabled."
|
||||
reloaded: "&aMaintenance configuration reloaded."
|
||||
status: "&7Maintenance mode status: {status}"
|
||||
usage: "&cUsage: /maintenance <on|off|status|reload>"
|
||||
|
||||
@@ -84,6 +84,7 @@ help:
|
||||
repair: " &f/repair &7- 修复手中或全部物品"
|
||||
admin: " &f/essc admin &7- 切换管理模式"
|
||||
tpsbar: " &f/tpsbar [玩家] &7- 切换 TPS 状态栏"
|
||||
maintenance: " &f/maintenance <on|off|status|reload> &7- 管理维护模式"
|
||||
|
||||
blocks-menu:
|
||||
title: "&6&lEssentialsC &8- &e&l便捷菜单"
|
||||
@@ -170,3 +171,14 @@ mobdrops-menu:
|
||||
name: "&d末影人掉落"
|
||||
status: "&7当前状态:{status}"
|
||||
toggle: "&e点击切换"
|
||||
|
||||
maintenance:
|
||||
status:
|
||||
enabled: "&c开启"
|
||||
disabled: "&a关闭"
|
||||
messages:
|
||||
enabled: "&a维护模式已开启。"
|
||||
disabled: "&c维护模式已关闭。"
|
||||
reloaded: "&a维护模式配置已重载。"
|
||||
status: "&7维护模式当前状态:{status}"
|
||||
usage: "&c用法:/maintenance <on|off|status|reload>"
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# EssentialsC 维护模式配置
|
||||
|
||||
config-version: 1
|
||||
|
||||
# 是否开启维护模式。
|
||||
enabled: false
|
||||
|
||||
# 拥有该权限的玩家可以在维护模式下进入服务器。
|
||||
bypass-permission: "essentialsc.maintenance.bypass"
|
||||
|
||||
motd:
|
||||
# 维护模式开启时是否替换服务器列表 MOTD。
|
||||
enabled: true
|
||||
lines:
|
||||
- "&c服务器维护中"
|
||||
- "&7请稍后再试"
|
||||
|
||||
kick-message:
|
||||
- "&c服务器正在维护"
|
||||
- "&7请稍后再进入"
|
||||
|
||||
bossbar:
|
||||
# 维护模式开启时是否向无绕过权限的在线玩家显示 BossBar。
|
||||
enabled: true
|
||||
title: "&c服务器正在维护"
|
||||
# 可选值:PINK / BLUE / RED / GREEN / YELLOW / PURPLE / WHITE
|
||||
color: RED
|
||||
# 可选值:SOLID / SEGMENTED_6 / SEGMENTED_10 / SEGMENTED_12 / SEGMENTED_20
|
||||
style: SOLID
|
||||
# 进度范围:0.0 - 1.0
|
||||
progress: 1.0
|
||||
@@ -26,3 +26,6 @@ modules:
|
||||
mob-drops:
|
||||
# 末影人掉落控制菜单和监听器。默认关闭,用于保留过去标准版的行为。
|
||||
enabled: false
|
||||
maintenance:
|
||||
# 维护模式。开启维护后可替换 MOTD,并阻止无绕过权限的玩家进入。
|
||||
enabled: true
|
||||
|
||||
@@ -92,6 +92,12 @@ permissions:
|
||||
essentialsc.command.tpsbar.others:
|
||||
description: 允许为其他玩家切换 /tpsbar
|
||||
default: op
|
||||
essentialsc.command.maintenance:
|
||||
description: 允许管理维护模式
|
||||
default: op
|
||||
essentialsc.maintenance.bypass:
|
||||
description: 允许在维护模式下进入服务器
|
||||
default: op
|
||||
essentialsc.shulkerbox.open:
|
||||
description: 允许通过 Shift+右键快捷打开潜影盒
|
||||
default: op
|
||||
@@ -129,5 +135,7 @@ permissions:
|
||||
essentialsc.command.reload: true
|
||||
essentialsc.command.tpsbar: true
|
||||
essentialsc.command.tpsbar.others: true
|
||||
essentialsc.command.maintenance: true
|
||||
essentialsc.maintenance.bypass: true
|
||||
essentialsc.shulkerbox.open: true
|
||||
essentialsc.mobdrops.enderman: true
|
||||
|
||||
Reference in New Issue
Block a user