Chunck Protector
Chunck Protector 是一个仅服务于服务端的 Fabric 模组,通过区域标志位(flags)来保护基于区块的领地。它完全在服务器端运行,因此玩家只需使用原版客户端加入服务器,无需安装任何模组。除了 Fabric Loader 外,该模组没有依赖项(无需 Fabric API)。
工作原理:管理员使用游戏内工具选择区块,从所选区块中创建一个命名受保护区域,然后通过游戏内的箱子 GUI 或命令来切换保护标志位。每当匹配的事件触及受保护区块时,服务器会立即强制执行每个标志位:包括方块编辑、PvP 攻击、爆炸、投射物、末影珍珠、液体流动、火焰蔓延、飞行、生物生成等。
支持版本
下载文件名与你的 Minecraft 版本相匹配的文件。
| 文件 |
Minecraft |
Java |
Fabric Loader |
| chunck-protector-1.0.0+1.21.11.jar |
1.21.11 |
21 |
0.19.3 |
| chunck-protector-1.0.0+26.1.jar |
26.1 - 26.1.2 |
25 |
0.19.3 |
| chunck-protector-1.0.0+26.2.jar |
26.2 |
25 |
0.19.3 |
| chunck-protector-1.0.0+26.3.jar |
26.3 |
25 |
0.19.5 |
安装
- 为你的 Minecraft 版本在服务端安装 Fabric Loader。
- 将匹配的
.jar 文件放入服务器的 mods 文件夹中。
- 启动服务器。默认配置文件将在
config/chunk_protector.json 处创建。
- 赋予你自己操作员权限。所有管理命令都需要配置的权限等级(默认:操作员等级 4)。
- 客户端无需安装任何东西。
命令
所有命令均以 /chunkprotector 开头,且需要操作员权限(可配置,默认等级 4)。
| 命令 |
描述 |
/chunkprotector info |
在聊天栏显示命令帮助 |
/chunkprotector reload |
从磁盘重新加载配置文件 |
/chunkprotector list |
列出所有受保护区域及其区块数量 |
/chunkprotector check |
显示你当前所在的区块是否受保护,并列出其标志位 |
/chunkprotector menu |
打开你所在区域的标志位 GUI |
/chunkprotector tool stick |
给自己发放管理员保护工具(木棍),用于选择区块 |
/chunkprotector tool shovel |
给自己发放认领工具(下界合金铲) |
/chunkprotector selection |
列出你当前选中的区块 |
/chunkprotector selection clear |
清除你当前选中的区块 |
/chunkprotector area create <id> |
根据你选中的区块创建受保护区域 |
/chunkprotector area <id> menu |
打开特定区域的标志位 GUI |
/chunkprotector area <id> toggle <flag> <true|false> |
通过命令行设置区域的某个标志位 |
区域 ID 和标志位名称支持 Tab 补全。
典型设置流程:执行 /chunkprotector tool stick,右键点击方块以选择区块,然后执行 /chunkprotector area create spawn,最后执行 /chunkprotector area spawn menu 来配置标志位。
配置
主配置文件:config/chunk_protector.json。
| 字段 |
默认值 |
描述 |
admin_tool_item |
minecraft:stick |
tool stick 命令发放的物品 |
claim_tool_item |
minecraft:netherite_shovel |
tool shovel 命令发放的物品 |
required_permission_level |
4 |
运行管理命令所需的操作员等级 |
safety_border_buffer_blocks |
16 |
液体流动保护使用的受保护区域周围缓冲区距离 |
protected_areas |
[] |
受保护区域定义的数组 |
protected_areas 中的每个条目具有以下结构:
| 字段 |
默认值 |
描述 |
area_id |
(必填) |
区域的唯一名称,用于命令和 GUI 标题 |
chunks |
(必填) |
区块坐标数组,每个均为 {"x": <int>, "z": <int>} 格式 |
auto_merge |
true |
填充所列区块之间的空隙,使区域作为一个整体区域行为 |
flags |
(见下文) |
区域特定的保护标志位 |
标志位
每个区域都有自己的一组标志位副本。可以在 GUI 或通过 /chunkprotector area <id> toggle <flag> <true|false> 命令来切换这些标志位。
| 标志位 |
默认值 |
描述 |
pvp_enabled |
false |
当为 false 时,取消区域内的玩家对玩家的攻击 |
block_edit_admin_only |
true |
当为 true 时,只有操作员可以在区域内放置或破坏方块 |
ender_pearls_allowed |
false |
当为 false 时,阻止末影珍珠传送进入或传送到区域内部 |
tnt_explosions_allowed |
false |
当为 false 时,抑制区域内的 TNT 爆炸 |
liquid_flow_allowed |
false |
当为 false 时,岩浆和水无法流入区域 |
griefing_protection_active |
true |
一般恶意破坏检查的主开关 |
projectiles_disabled |
true |
当为 true 时,停止区域内的投射物(如箭矢) |
no_flight_zone |
true |
当为 true 时,禁用区域内非操作员玩家的飞行能力 |
no_fight_zone |
true |
当为 true 时,阻断区域内所有战斗和实体伤害 |
mob_spawning_allowed |
false |
当为 false 时,阻止区域内的自然生物生成 |
wither_creeper_grief_allowed |
false |
当为 false 时,凋灵和苦力怕的爆炸不会破坏方块 |
hostile_despawn_proximity_radius |
8 |
在此半径(区块数)内的敌对生物将被消失;设置为 0 以禁用 |
sulfur_cube_damage_disabled |
true |
当为 true 时,硫磺立方体不能在区域内爆炸(26.2 及更高版本) |
fire_spread_disabled |
true |
当为 true 时,火焰无法在区域内蔓延 |
crop_trample_disabled |
true |
当为 true 时,农田和作物不能在区域内被践踏 |
item_drop_disabled |
false |
当为 true 时,非操作员玩家不能在区域内丢弃物品 |
vehicle_entry_disabled |
false |
当为 true 时,玩家不能在区域内进入船只、矿车和其他载具 |
animal_breeding_disabled |
false |
当为 true 时,阻断区域内的动物繁殖 |
标志位 GUI
/chunkprotector menu 和 /chunkprotector area <id> menu 命令会打开一个拥有 54 个槽位的箱子菜单。顶行显示区域名称、区块数量以及自动合并状态。功能标志按类别分组(战斗、建筑、移动、世界、实体),每个物品会显示其当前开/关状态、该标志的作用、开启和关闭的含义,以及点击提示。已启用的标志会发光。左击某个标志即可切换其状态;更改会立即保存。空槽位为填充面板,无法拾取。
服务器管理员须知
- 此模组仅作用于服务端。请勿将其安装至客户端;原版客户端可直接使用。
- 手动编辑 JSON 配置文件后,请使用
/chunkprotector reload 重新加载配置。
- 重叠的区块选择通过内部缓存进行解析,该缓存在加载和重载时重建。
- 许可证:MIT。
Chunck Protector
Chunck Protector is a server-side only Fabric mod that protects chunk-based territories with per-area flags. It runs entirely on the server, so players join with a vanilla client and need no mods installed. There are no dependencies besides Fabric Loader (no Fabric API required).
How it works: an administrator selects chunks with an in-game tool, creates a named protected area from the selection, and then toggles protection flags either from an in-game chest GUI or with commands. Every flag is enforced on the server the moment the matching event touches a protected chunk: block edits, PvP hits, explosions, projectiles, ender pearls, liquid flow, fire spread, flight, mob spawning, and more.
Supported versions
Download the file whose name matches your Minecraft version.
| File |
Minecraft |
Java |
Fabric Loader |
| chunck-protector-1.0.0+1.21.11.jar |
1.21.11 |
21 |
0.19.3 |
| chunck-protector-1.0.0+26.1.jar |
26.1 - 26.1.2 |
25 |
0.19.3 |
| chunck-protector-1.0.0+26.2.jar |
26.2 |
25 |
0.19.3 |
| chunck-protector-1.0.0+26.3.jar |
26.3 |
25 |
0.19.5 |
Installation
- Install Fabric Loader for your Minecraft version on the server.
- Put the matching
.jar file into the server mods folder.
- Start the server. A default config file is created at
config/chunk_protector.json.
- Give yourself operator status. All management commands require the configured permission level (default: operator level 4).
- Nothing needs to be installed on clients.
Commands
All commands start with /chunkprotector and require operator permission (configurable, default level 4).
| Command |
Description |
/chunkprotector info |
Show command help in chat |
/chunkprotector reload |
Reload the config file from disk |
/chunkprotector list |
List all protected areas with chunk counts |
/chunkprotector check |
Show whether your current chunk is protected and list its flags |
/chunkprotector menu |
Open the flag GUI for the area you are standing in |
/chunkprotector tool stick |
Give yourself the Admin Protection Tool (stick) for selecting chunks |
/chunkprotector tool shovel |
Give yourself the Claim Tool (netherite shovel) |
/chunkprotector selection |
List your currently selected chunks |
/chunkprotector selection clear |
Clear your current chunk selection |
/chunkprotector area create <id> |
Create a protected area from your selected chunks |
/chunkprotector area <id> menu |
Open the flag GUI for a specific area |
/chunkprotector area <id> toggle <flag> <true|false> |
Set one flag of an area from the command line |
Area ids and flag names support tab completion.
Typical setup flow: /chunkprotector tool stick, right-click blocks to select chunks, /chunkprotector area create spawn, then /chunkprotector area spawn menu to configure flags.
Configuration
Main file: config/chunk_protector.json.
| Field |
Default |
Description |
admin_tool_item |
minecraft:stick |
Item handed out by the tool stick command |
claim_tool_item |
minecraft:netherite_shovel |
Item handed out by the tool shovel command |
required_permission_level |
4 |
Operator level required to run management commands |
safety_border_buffer_blocks |
16 |
Buffer distance around protected areas used by liquid-flow protection |
protected_areas |
[] |
Array of protected area definitions |
Each entry in protected_areas has the following shape:
| Field |
Default |
Description |
area_id |
(required) |
Unique name of the area, used by commands and the GUI title |
chunks |
(required) |
Array of chunk coordinates, each as {"x": <int>, "z": <int>} |
auto_merge |
true |
Fill gaps between the listed chunks so the area behaves as one region |
flags |
(see below) |
Per-area protection flags |
Flags
Every area has its own copy of these flags. Flags can be toggled in the GUI or with /chunkprotector area <id> toggle <flag> <true|false>.
| Flag |
Default |
Description |
pvp_enabled |
false |
When false, player attacks on other players are cancelled in the area |
block_edit_admin_only |
true |
When true, only operators can place or break blocks in the area |
ender_pearls_allowed |
false |
When false, ender pearl teleports into or inside the area are blocked |
tnt_explosions_allowed |
false |
When false, TNT explosions are suppressed in the area |
liquid_flow_allowed |
false |
When false, lava and water cannot flow into the area |
griefing_protection_active |
true |
Master switch for general griefing checks |
projectiles_disabled |
true |
When true, projectiles such as arrows are stopped in the area |
no_flight_zone |
true |
When true, flight is disabled for non-operator players in the area |
no_fight_zone |
true |
When true, all combat and entity damage is blocked in the area |
mob_spawning_allowed |
false |
When false, natural mob spawning is blocked in the area |
wither_creeper_grief_allowed |
false |
When false, wither and creeper explosions do not break blocks |
hostile_despawn_proximity_radius |
8 |
Hostile mobs within this many chunks of a player are despawned; set to 0 to disable |
sulfur_cube_damage_disabled |
true |
When true, sulfur cubes cannot explode in the area (26.2 and newer) |
fire_spread_disabled |
true |
When true, fire cannot spread inside the area |
crop_trample_disabled |
true |
When true, farmland and crops cannot be trampled in the area |
item_drop_disabled |
false |
When true, non-operator players cannot drop items in the area |
vehicle_entry_disabled |
false |
When true, players cannot enter boats, minecarts and other vehicles in the area |
animal_breeding_disabled |
false |
When true, animal breeding is blocked in the area |
Flag GUI
The /chunkprotector menu and /chunkprotector area <id> menu commands open a 54-slot chest menu. The top row shows the area name, chunk count and auto-merge state. Flags are grouped by category (Combat, Building, Movement, World, Entities) and each item shows its current ON/OFF state, what the flag does, what ON and OFF mean, and a click hint. Enabled flags glow. Left-click a flag to toggle it; the change saves immediately. Empty slots are filler panes and cannot be taken.
Notes for server owners
- The mod is server-side only. Do not put it on clients; vanilla clients work as-is.
- Reload the config with
/chunkprotector reload after editing the JSON by hand.
- Overlapping chunk selections resolve through an internal cache that is rebuilt on load and reload.
- License: MIT.
评论 0
登录后参与评分
还没有评论,来抢沙发吧