CancelBlockUpdate
CancelBlockUpdate 是一个兼容 Bukkit 的插件,用于按世界抑制特定方块的更新。
这是一个兼容 Bukkit 的方块更新抑制插件,支持按世界开启或关闭指定方块的更新抑制,适配 Multiverse 多世界场景,并使用 Bukkit 权限节点兼容 LuckPerms。
Compatibility(兼容性)
- Minecraft
1.20.x 至当前 26.x 服务端。
- Bukkit / CraftBukkit 兼容服务端。
- Paper 和 Purpur 服务端。
- 插件
api-version 设置为 1.20,因此旧版受支持的服务端在加载时不会拒绝该插件。
- 基于 Spigot/Bukkit
1.20 API 和 Java 17 字节码构建。请使用该服务端版本所需的 Java 版本运行服务器。
在更新此插件时检查的最新 Paper 版本为 26.1.2。
Features(功能特性)
- 按世界控制方块更新。
- 通过 Bukkit 世界名称实现与 Multiverse 兼容的世界处理。
- 通过标准 Bukkit 权限节点实现与 LuckPerms 兼容的权限系统。
/cbu 命令前缀并支持 Tab 补全。
- 运行时重新加载配置文件和本地化文件。
- 可配置聊天消息前缀。
locals/ 目录下包含 10 个内置 i18n 文件。
- 当存在匹配的内置本地化文件时,玩家消息将遵循其 Minecraft 客户端语言设置。
- 控制台消息默认使用英语。
- 可配置被抑制的方块材质列表。
- 使用材质集合和早期按世界检查进行高效的抑制查找。
Installation(安装)
- 构建插件 jar 文件。
- 将
build/libs/CancelBlockUpdate-1.1.0.jar 复制到服务器的 plugins/ 目录中。
- 重启服务器。
- 根据需要编辑
plugins/CancelBlockUpdate/config.yml。
- 编辑配置文件或本地化文件后,运行
/cbu reload。
Commands(命令)
| Command(命令) |
Permission(权限) |
Description(描述) |
/cbu help |
cbu.help |
显示命令帮助。 |
/cbu reload |
cbu.reload |
重新加载配置文件和本地化文件。 |
/cbu world enable |
cbu.world |
在执行者当前世界中启用正常方块更新。仅限玩家使用。 |
/cbu world disable |
cbu.world |
在执行者当前世界中禁用配置的方块更新。仅限玩家使用。 |
/cbu block add <ID> |
cbu.block.add |
将被抑制的方块列表中添加一个方块材质 ID。<ID> 之后的额外参数将被忽略。 |
/cbu block add |
cbu.block.add |
添加玩家正看向的非空气方块。仅限玩家使用。 |
材质 ID 可以使用 Bukkit 材质名称、小写名称、带连字符的名称或 minecraft: 命名空间,例如:
GRASS_BLOCK
sand
minecraft:redstone_wire
Permissions(权限)
| Permission(权限) |
Default(默认值) |
Description(描述) |
cbu.admin |
op |
授予所有插件权限。 |
cbu.help |
op |
允许使用 /cbu help。 |
cbu.reload |
op |
允许使用 /cbu reload。 |
cbu.world |
op |
允许使用 /cbu world enable 和 /cbu world disable。 |
cbu.block.add |
op |
允许使用 /cbu block add。 |
LuckPerms 可以直接管理这些权限节点。
Configuration(配置)
默认 config.yml:
messages:
prefix: "&bCBU &7>> &r"
default-block-updates-enabled: true
max-target-distance: 8
suppressed-blocks:
- GRASS_BLOCK
worlds: {}
示例按世界配置:
worlds:
world:
block-updates-enabled: false
world_nether:
block-updates-enabled: true
block-updates-enabled: false 表示在该世界中,suppressed-blocks 列表中材质的更新将被取消。
Config Tolerance(配置容错)
该插件能容忍常见的手动编辑错误,但它不是一个完整的配置修复工具:
- 如果
config.yml 在启动时是格式错误的 YAML,则使用内置默认值并记录警告日志。
- 如果在执行
/cbu reload 期间 config.yml 变为格式错误,则保留之前的有效设置并记录警告日志。
- 接受布尔字符串如
true、false、on 和 off。
suppressed-blocks 可以是 YAML 列表或单个逗号分隔的字符串。
worlds.<name>: false 可作为 worlds.<name>.block-updates-enabled: false 的简写形式接受。
- 无效的材质 ID 和错误的值类型会被记录并被忽略或由默认值替换。
Locale Files(本地化文件)
本地化文件复制到以下位置:
plugins/CancelBlockUpdate/locals/
内置本地化文件:
en_US.yml
zh_CN.yml
zh_TW.yml
es_ES.yml
fr_FR.yml
de_DE.yml
pt_BR.yml
ru_RU.yml
ja_JP.yml
ko_KR.yml
本地化匹配器接受精确的内置本地化文件和语言级别的回退机制。例如,es_mx 会回退到 es_ES,pt_pt 会回退到 pt_BR,简体中文本地化使用 zh_CN,而繁体中文本地化(如 zh_tw、zh_hk、zh_mo 和 zh_hant)使用 zh_TW。
CancelBlockUpdate
CancelBlockUpdate is a Bukkit-compatible plugin that suppresses selected block updates on a per-world basis.
这是一个 Bukkit 兼容的方块更新抑制插件,支持按世界开启或关闭指定方块的更新抑制,适配 Multiverse 多世界场景,并使用 Bukkit 权限节点兼容 LuckPerms。
Compatibility
- Minecraft
1.20.x through current 26.x servers.
- Bukkit / CraftBukkit-compatible servers.
- Paper and Purpur servers.
- Plugin
api-version is 1.20 so older supported servers do not reject the plugin at load time.
- Built against the Spigot/Bukkit
1.20 API and Java 17 bytecode. Run the server with the Java version required by that server release.
The latest Paper release checked while updating this plugin was 26.1.2.
Features
- Per-world block update control.
- Multiverse-compatible world handling through Bukkit world names.
- LuckPerms-compatible permissions through standard Bukkit permission nodes.
/cbu command prefix with tab completion.
- Runtime reload for config and locale files.
- Configurable chat message prefix.
- 10 bundled i18n files under
locals/.
- Player messages follow the player's Minecraft client language when a bundled locale matches.
- Console messages default to English.
- Configurable suppressed block material list.
- Efficient suppression lookup using a material set and early per-world checks.
Installation
- Build the plugin jar.
- Copy
build/libs/CancelBlockUpdate-1.1.0.jar into your server's plugins/ directory.
- Restart the server.
- Edit
plugins/CancelBlockUpdate/config.yml as needed.
- Run
/cbu reload after editing config or locale files.
Commands
| Command |
Permission |
Description |
/cbu help |
cbu.help |
Show command help. |
/cbu reload |
cbu.reload |
Reload config and locale files. |
/cbu world enable |
cbu.world |
Enable normal block updates in the executor's current world. Player-only. |
/cbu world disable |
cbu.world |
Disable configured block updates in the executor's current world. Player-only. |
/cbu block add <ID> |
cbu.block.add |
Add a block material id to the suppressed block list. Extra arguments after <ID> are ignored. |
/cbu block add |
cbu.block.add |
Add the non-air block the player is looking at. Player-only. |
Material IDs may use Bukkit material names, lower-case names, hyphenated names, or a minecraft: namespace, for example:
GRASS_BLOCK
sand
minecraft:redstone_wire
Permissions
| Permission |
Default |
Description |
cbu.admin |
op |
Grants all plugin permissions. |
cbu.help |
op |
Allows /cbu help. |
cbu.reload |
op |
Allows /cbu reload. |
cbu.world |
op |
Allows /cbu world enable and /cbu world disable. |
cbu.block.add |
op |
Allows /cbu block add. |
LuckPerms can manage these nodes directly.
Configuration
Default config.yml:
messages:
prefix: "&bCBU &7>> &r"
default-block-updates-enabled: true
max-target-distance: 8
suppressed-blocks:
- GRASS_BLOCK
worlds: {}
Example per-world configuration:
worlds:
world:
block-updates-enabled: false
world_nether:
block-updates-enabled: true
block-updates-enabled: false means updates for materials in suppressed-blocks will be cancelled in that world.
Config Tolerance
The plugin tolerates common manual edit mistakes, but it is not a full config repair tool:
- If
config.yml is malformed YAML on startup, bundled defaults are used and a warning is logged.
- If
config.yml becomes malformed during /cbu reload, the previous valid settings are kept and a warning is logged.
- Boolean strings such as
true, false, on, and off are accepted.
suppressed-blocks may be a YAML list or a single comma-separated string.
worlds.<name>: false is accepted as a shorthand for worlds.<name>.block-updates-enabled: false.
- Invalid material ids and wrong value types are logged and ignored or replaced by defaults.
Locale Files
Locale files are copied to:
plugins/CancelBlockUpdate/locals/
Bundled locales:
en_US.yml
zh_CN.yml
zh_TW.yml
es_ES.yml
fr_FR.yml
de_DE.yml
pt_BR.yml
ru_RU.yml
ja_JP.yml
ko_KR.yml
The locale matcher accepts exact bundled locales and language-level fallbacks. For example, es_mx falls back to es_ES, pt_pt falls back to pt_BR, Simplified Chinese locales use zh_CN, and Traditional Chinese locales such as zh_tw, zh_hk, zh_mo, and zh_hant use zh_TW.
评论 0
登录后参与评分
还没有评论,来抢沙发吧