**正在寻找其他 Minecraft 版本?**请参阅版本指南。
**从 1.4.1-hotfix.2 或更早版本更新?**这些旧构建版仍会检查旧的仓库 URL,并且由于 GitHub 的重定向机制,无法自动通知您。请手动从 GitHub Releases、Modrinth、CurseForge 或 Hangar 下载 1.4.5 以恢复自动更新提醒、启动备份以及最新的修复。即使仅落后一个构建版本,也建议始终进行更新。
BlockProt Reloaded 是 BlockProt 的一个维护分支,适用于 Paper、Purpur 和 Folia 服务器(Minecraft 1.21.7 至 26.3)。它在保留原始基于 NBT 的保护核心的同时,增加了稳定性修复、性能改进以及上游未提供的新功能。
功能介绍
玩家潜行并右键点击任何可锁定的方块或实体即可打开保护 GUI:无需使用命令。在 GUI 中,玩家可以锁定或解锁、管理每个方块的好友列表并将方块设为公开、控制红石和漏斗访问权限、查看访问审计记录,并在方块之间复制和粘贴设置。
管理员拥有独立的管理工具集:分页方块浏览器(/bp lockables)、按玩家分组的方块列表(/bp info)、解锁 GUI(/bp unlock)、工作人员角色管理(/bp tiers)、诊断工具(/bp debug run)以及每个受保护方块的完整审计日志。
受保护的内容
Tile entities(存储类实体): 所有箱子变体、所有 17 种潜影盒颜色、所有 12 种架子变体(1.21.9+)、熔炉、烟熏炉、高炉、漏斗、发射器、投掷器、 barrel(木桶)、酿造台、装饰罐、雕刻书架、合成器、唱片机、讲台、蜂巢、蜂箱。
交互方块: 门、陷阱门和栅栏门(所有木材变体以及铁质和所有铜氧化阶段)、铁砧、炼药锅、附魔台、砂轮、切石机、织布机、制图台、锻造台、堆肥桶、钟、音符盒、龙蛋。
实体: 物品展示框、发光物品展示框、带箱子的船(所有木材变体)、带箱子的矿车、漏斗矿车。驯服动物(狼、猫、鹦鹉、马、羊驼)和不可驯服但可保护的实体(村民)通过实体保护系统进行保护。
所有方块列表均在 blocks.yml 中定义,并可在运行时更改而无需重启服务器。
本分支新增功能
修复锁定菜单布局
Block Lock GUI 中的每个按钮现在在所有方块和实体类型中都占据固定位置。之前,如果缺少某个按钮(例如工作台没有红石按钮),会导致后续所有按钮左移,使得不同方块类型的菜单不一致。
实体保护
可以保护驯服的动物(狼、猫、鹦鹉、马、羊驼)和村民。手持配置好的菜单物品(默认:木棍)右键点击你的实体即可打开保护 GUI。默认禁用;请在 config.yml 的 entity_protection 下启用。此功能在早期版本中名为 pet_protection:升级时会自动迁移旧键名,无需手动编辑。
村民工作站保护
工作记忆指向受保护工作站方块的村民将自动继承该方块的保护状态。非所有者无法损坏或与关联的村民进行交易,也无法破坏或与该工作站周围配置区域内的方块进行交互。在工作站的锁定菜单中会出现一个“定位关联村民”的绿宝石按钮,点击后会在村民所在位置显示仅对点击玩家可见的短粒子效果。可在 config.yml 中配置:
villager_workstation_protection:
enabled: true
radius: 2 # 水平搜索半径 (0-8)
vertical_radius: 1 # 垂直搜索半径 (0-4)
物品展示框保护与自动方块链接
物品展示框和发光物品展示框采用相同的潜行加右键点击流程进行保护。放置在可锁定方块面上的展示框会自动与该方块链接:它完全共享该方块的拥有者、好友和锁定状态,与其交互会直接打开该方块的锁定菜单。未安装在可锁定方块上的展示框则保持独立的实体保护流程。
载具存储保护
带箱子的船、储物矿车和漏斗矿车支持相同的潜行加右键点击流程。一旦受到保护,非所有者无法打开其容器,且载具会受到损坏和破坏防护。漏斗提取功能可通过菜单中的红石按钮按载具单独切换。
方块家族表达式系统
blocks.yml 和 worlds.yml 支持紧凑的家族表达式, alongside 标准的扁平材料列表:
lockable_tile_entities:
- "[*]" # 所有 tile entities
- "[*-CHEST -*SIGN]" # 所有箱子,不含告示牌
lockable_entities:
- "[*-CHEST_BOATS ITEM_FRAME]" # 仅限带箱子的船和物品展示框
子家族分类:CHEST(箱子)、FURNACE(熔炉)、SHELF(架子)、TRANSPORT(运输)、MISC(杂项)、SIGN(告示牌)(tile entities);SHULKERS(潜影盒);ANVIL(铁砧)、CAULDRON(炼药锅)、WORKSTATION(工作站)、TRAPDOOR(陷阱门)、FENCE_GATE(栅栏门)(方块);DOORS(门);CHEST_BOATS(带箱子的船)、CHEST_MINECARTS(储物矿车)、HOPPER_MINECARTS(漏斗矿车)、ITEM_FRAMES(物品展示框)(实体)。
完整语法:docs/MODERN SYNTAX AND LEGACY/BLOCK_FAMILY_SYNTAX.md。完整材质列表:docs/MODERN SYNTAX AND LEGACY/LOCKABLE_BLOCKS_REFERENCE.md。
配置与方块在每次重载时自动合并
在每次启动和 /bp reload 时,缺失的键会从 JAR 默认值中添加,重命名的键会进行迁移。现有值(包括 blocks.yml 中已编写的所有族表达式)永远不会被覆盖或重新排序。在传统扁平列表模式下,来自较新版本 JAR 的新材质条目会自动追加,从而使新类型的方块无需手动编辑即可变为可锁定的。
袭击检测
监控靠近可锁定方块的爆炸。记录事件,如果拥有者在线则通过操作栏和聊天发送警报,否则将警报排队以待下次登录时发送。可通过 raid_detection.enabled 进行配置。
StatHandler 稳定性
saveFile() 已重写,采用临时写入、验证、备份、替换序列,并为不支持原子跨目录移动的文件系统提供回退机制(修复 Windows 上出现的“无法交换备份 NBT 文件”错误)。Caffeine 缓存将对每个玩家的过期条目扫描限制为每玩家每秒一次。区块加载守卫防止在 purgeStalePbsEntries 中进行同步区块加载。
性能
- 对
HopperEventListener 和 HybridDatabase 上的 Caffeine 缓存进行限制,通过 ProtectedBlockCache 实现 O(1) 漏斗提前退出,而不会阻塞服务器或 Folia 区域线程。
purgeStalePbsEntries 完全跳过未加载的区块,以防止主线程阻塞。
- 线程安全的 SQLite 审计日志 (
blockprot_audit.sqlite),带有序列化 WAL 连接处理。
其他新增功能
- 访问审计日志 (
/bp logs [here|player <name>|<page>]):分页的 SQLite 审计历史,用于检查容器开启、物品交易和拒绝访问。
- 双向漏斗和物品拾取保护:防止未经授权提取、非法插入物品以及在锁定容器和存储载具上通过
InventoryPickupItemEvent 窃取物品。
- 环境和特殊容器保护:保护装饰花盆免受投射物攻击,强制执行凿刻书架的每槽位
READ/WRITE 访问权限,阻止火点燃/蔓延、液体流动 (BlockFromToEvent)、未经授权的桶充水、掉落方块以及发射器对受保护容器的红石激活,并保护实体免受伤害、投射物和拴绳的影响。
- 活塞挤压和移动保护:防止活塞移动或挤压锁定的方块和容器。
- 离线模式 UUID 隔离:当
online-mode: false 时绕过 Mojang HTTP 查找,并在基岩版前缀检查时剥离握手查询参数。
- 动态功能门控和管理员层级继承:隐藏禁用的命令 (
/bp tiers, /bp friends, /bp logs),将玩家 use_menus 聊天命令限制为 /bp user 和 /bp admin,强制执行 t2 继承,并允许显式的权限否定覆盖 OP 回退。
- 多层级管理员权限 (
admin_tiers.enabled) 和独立的 admins.yml 层级结构。
- 原生 Paper 对话框 (
use_dialogs: true),带有柔和色彩调色板。
- 基岩版触摸表单(通过 Geyser 和 Floodgate 使用 Cumulus API)。
- 所有权转移:
/bp transferall <player> 将你所有方块的所有权转移到另一个玩家。
- 通过
worlds.yml (per_worlds_config: true) 实现按世界配置。
- 通过
ConfigFileWatcher (auto_reload_configs,默认为 true) 实现自动重载。
- 版本升级时自动生成备份 zip。
- 传统文件夹迁移:在重命名后的首次启动时自动从
BlockProt 或 BlockProtPlus 文件夹复制数据。
- SQLite 用户缓存移至插件数据文件夹;旧文件会自动迁移。
- 不活跃清理:移除由长期不活跃玩家拥有的保护(
inactivity_cleanup_days,默认禁用)。
- WorldEdit 粘贴自动锁定(默认禁用)。
- PlaceholderAPI 占位符:
%blockprot_global_block_count%, %blockprot_own_block_count%, %blockprot_default_friends%。
- 通过 FoliaLib 实现 Folia 兼容性。
- ViaVersion、ViaBackwards 和 ViaRewind 检测。
命令
| 命令 |
权限 |
描述 |
/bp user |
blockprot.user |
主个人用户菜单或对话框 |
/bp admin |
blockprot.user.admin |
管理控制菜单或对话框 |
/bp friends |
blockprot.user |
管理全局默认好友列表 |
/bp settings |
blockprot.user |
个人玩家偏好设置界面 |
/bp logs [here|player <name>|<page>] |
blockprot.user / Admin |
查看针对自身、指定方块或其他玩家的访问审计日志 |
/bp transferall <player> |
blockprot.user |
将所有受保护的方块所有权转移给其他玩家 |
/bp lockables |
blockprot.user.admin |
分页 GUI,列出所有具有活跃/非活跃状态的方块和实体 |
/bp tiers |
blockprot.user.admin 或 blockprot.user.admin.owner |
员工角色 GUI 和自定义权限管理器 |
/bp info <player> |
blockprot.user.admin |
显示某玩家拥有的所有带传送链接的方块 |
/bp unlock <player> |
blockprot.user.admin |
检查或移除任何玩家的保护(控制台:列出它们) |
/bp protdel [world] |
blockprot.user.admin |
批量删除世界中的保护并支持撤销 |
/bp reload |
blockprot.user.admin |
重新加载所有配置文件并合并缺失的键 |
/bp update |
blockprot.user.admin |
检查并从 GitHub 下载版本更新 |
/bp integrations |
blockprot.user.admin |
检查所有第三方集成的状态 |
/bp recommended <blocks|config|all> |
blockprot.user.admin.owner |
应用推荐的配置配置文件 |
/bp debug run |
blockprot.user.admin 或 blockprot.debug |
运行内部诊断(也可从控制台执行) |
权限
| 权限 |
默认值 |
描述 |
blockprot.user |
true |
所有标准玩家功能 |
blockprot.user.admin |
op |
管理员命令和 GUI |
blockprot.user.admin.t1 |
false |
低级员工层级(方块列表、只读方块信息和审计日志) |
blockprot.user.admin.t2 |
false |
中级员工层级(解锁、lockables、破坏受保护的方块) |
blockprot.user.admin.t3 |
false |
高级员工层级(世界保护删除、配置、调试) |
blockprot.user.admin.owner |
op |
完全所有者控制及员工角色分配 |
blockprot.lockmax |
false |
豁免方块数量限制(无上限) |
blockprot.locklimit.<N> |
false |
按玩家设置的限额覆盖(例如 blockprot.locklimit.500) |
blockprot.blocks.tp |
op |
从统计数据和管理员 GUI 传送到方块 |
blockprot.debug |
op |
访问 /bp debug |
员工层级节点仅在 admin_tiers.enabled: true 时生效。
兼容性
|
|
| Minecraft |
1.21.7 - 26.3(在运行时以数字检测) |
| 服务器软件 |
Paper, Purpur, Folia |
| Java |
需要 Java 21+(JDK 25 工具链) |
| MySQL |
MySQL 8+, MariaDB 10.5+(可选) |
| 语言 |
GitLocalize 上提供 25 种语言:AR, CS, DE, EN, ES, FI, FR, HE, HU, ID, IT, JA, KO, NL, PL, PT-BR, RO, RU, SK, SV, TH, TR, UK, ZH-CN, ZH-TW |
集成
Towny, WorldGuard, Zelly's Guard, Lands, ClaimChunk, GriefPrevention, Residence, PlaceholderAPI, SkinsRestorer, WorldEdit/FAWE, Floodgate/Geyser, ViaVersion/ViaBackwards/ViaRewind, Folia.
安装
将 JAR 文件放入 plugins/ 目录并重启服务器。需要 Java 21+ 以及 Paper, Purpur 或 Folia 1.21.7 - 26.3。升级时,配置键会自动迁移:无需手动编辑。
文档
仓库地址:
问题与贡献:
许可证:GNU General Public License v3 - 基于 spnda 开发的 BlockProt。
Looking for another Minecraft version? See the version guide.
Updating from 1.4.1-hotfix.2 or older? Those older builds still check the previous repository URL and will not notify you automatically due to the GitHub redirect. Download 1.4.5 manually from GitHub Releases, Modrinth, CurseForge, or Hangar to restore automatic update alerts, startup backups, and the latest fixes. Updating is always recommended, even when only 1 build behind.
BlockProt Reloaded is a maintained fork of BlockProt for Paper, Purpur, and Folia servers (Minecraft 1.21.7 through 26.3). It preserves the original NBT-based protection core while adding stability fixes, performance improvements, and new features not present upstream.
What it does
Players sneak and right-click any lockable block or entity to open the protection GUI: no commands required. From the GUI they can lock or unlock, manage a per-block friend list and make blocks public, control redstone and hopper access, inspect the access audit trail, and copy and paste settings between blocks.
Admins get a separate toolset: a paged block browser (/bp lockables), per-player block lists (/bp info), an unlock GUI (/bp unlock), staff roles management (/bp tiers), diagnostics (/bp debug run), and a full audit log per protected block.
What is protected
Tile entities (storage): all chest variants, all 17 shulker box colors, all 12 shelf variants (1.21.9+), furnace, smoker, blast furnace, hopper, dispenser, dropper, barrel, brewing stand, decorated pot, chiseled bookshelf, crafter, jukebox, lectern, beehive, bee nest.
Interactive blocks: doors, trapdoors, and fence gates (all wood variants plus iron and all copper oxidation stages), anvils, cauldrons, enchanting table, grindstone, stonecutter, loom, cartography table, smithing table, composter, bell, note block, dragon egg.
Entities: item frames, glowing item frames, chest boats (all wood variants), chest minecarts, hopper minecarts. Tamed animals (wolves, cats, parrots, horses, llamas) and non-tameable protectable entities (villagers) via the entity protection system.
All block lists are defined in blocks.yml and can be changed at runtime without restarting.
Features added in this fork
Fixed lock menu layout
Every button in the Block Lock GUI now occupies a fixed slot across all block and entity types. Previously, a missing button (for example, no Redstone button on a workstation) caused all subsequent buttons to shift left, making the menu inconsistent between block types.
Entity protection
Tamed animals (wolves, cats, parrots, horses, llamas) and villagers can be protected. Right-click your entity while holding the configured menu item (default: Stick) to open the protection GUI. Disabled by default; enable under entity_protection in config.yml. Renamed from pet_protection in earlier versions: the old key is migrated automatically on upgrade, no manual edit needed.
Villager workstation protection
A villager whose job-site memory points to a protected workstation block inherits that block's protection automatically. Non-owners cannot damage or trade with the linked villager and cannot break or interact with blocks in a configurable area around the workstation. A "Locate linked villager" Emerald button appears in the workstation's lock menu, showing a short particle effect at the villager's location visible only to the clicking player. Configurable in config.yml:
villager_workstation_protection:
enabled: true
radius: 2 # horizontal search radius (0-8)
vertical_radius: 1 # vertical search radius (0-4)
Item frame protection with automatic block linking
Item frames and glowing item frames are protected with the same sneak-and-right-click flow. A frame placed on the face of a lockable block is automatically linked to that block: it shares the block's owner, friends, and lock state exactly, and interacting with it opens the block's lock menu directly. Frames not mounted on a lockable block keep the standalone entity-protection flow.
Storage vehicle protection
Chest boats, storage minecarts, and hopper minecarts support the same sneak-and-right-click flow. Once protected, non-owners cannot open the inventory, and the vehicle is protected from damage and destruction. Hopper extraction can be toggled per vehicle from the in-menu Redstone button.
Block family expression system
blocks.yml and worlds.yml support compact family expressions alongside standard flat material lists:
lockable_tile_entities:
- "[*]" # all tile entities
- "[*-CHEST -*SIGN]" # all chests, no signs
lockable_entities:
- "[*-CHEST_BOATS ITEM_FRAME]" # chest boats and item frames only
Sub-families: CHEST, FURNACE, SHELF, TRANSPORT, MISC, SIGN (tile entities); SHULKERS; ANVIL, CAULDRON, WORKSTATION, TRAPDOOR, FENCE_GATE (blocks); DOORS; CHEST_BOATS, CHEST_MINECARTS, HOPPER_MINECARTS, ITEM_FRAMES (entities).
Full syntax: docs/MODERN SYNTAX AND LEGACY/BLOCK_FAMILY_SYNTAX.md. Full material list: docs/MODERN SYNTAX AND LEGACY/LOCKABLE_BLOCKS_REFERENCE.md.
Config and blocks auto-merge on every reload
On every startup and /bp reload, missing keys are added from JAR defaults and renamed keys are migrated. Existing values: including every family expression already written in blocks.yml: are never overwritten or reordered. In legacy flat-list mode, new material entries from a newer JAR are appended automatically so new block types become lockable without manual edits.
Raid detection
Monitors explosions near lockable blocks. Logs the event, alerts the owner via action bar and chat if online, or queues the alert for delivery at next login. Configurable via raid_detection.enabled.
StatHandler stability
saveFile() was rewritten to use a temp-write, validate, backup, replace sequence with a fallback for filesystems that do not support atomic cross-directory moves (fixes Failed to swap backup NBT file on Windows). A Caffeine cache throttles the per-player stale-entry scan to once per 60 seconds per player. A chunk-load guard prevents synchronous chunk loads in purgeStalePbsEntries.
Performance
- Bounded Caffeine caches on
HopperEventListener and HybridDatabase for O(1) hopper early-exit via ProtectedBlockCache without stalling server or Folia region threads.
purgeStalePbsEntries skips unloaded chunks entirely to prevent main-thread stalls.
- Thread-safe SQLite audit logging (
blockprot_audit.sqlite) with serialized WAL connection handling.
Other additions
- Access audit logs (
/bp logs [here|player <name>|<page>]): paginated SQLite audit history for inspecting container opens, item transactions, and denied accesses.
- Bidirectional hopper and item-pickup protection: prevents unauthorized extraction, illegal item insertion, and
InventoryPickupItemEvent siphoning on locked containers and storage vehicles.
- Environmental and special container protection: shields decorated pots from projectiles, enforces per-slot
READ/WRITE access on chiseled bookshelves, blocks fire ignition/spread, liquid flow (BlockFromToEvent), unauthorized bucket waterlogging, falling blocks, and dispenser redstone activation against protected containers, and protects entities from damage, projectiles, and leashes.
- Piston crushing and movement protection: prevents pistons from moving or crushing locked blocks and containers.
- Offline-mode UUID isolation: bypasses Mojang HTTP lookups when
online-mode: false and strips handshake query parameters on Bedrock prefix checks.
- Dynamic feature gating and staff tier inheritance: hides disabled commands (
/bp tiers, /bp friends, /bp logs) cleanly, restricts player use_menus chat commands to /bp user and /bp admin, enforces t2 inheritance, and lets explicit permission negations override OP fallback.
- Multi-tier staff permissions (
admin_tiers.enabled) and standalone admins.yml hierarchy.
- Native Paper Dialogs (
use_dialogs: true) with pastel color palettes.
- Bedrock touch forms (Cumulus API via Geyser and Floodgate).
- Ownership transfer:
/bp transferall <player> moves ownership of all your blocks to another player.
- Per-world configuration via
worlds.yml (per_worlds_config: true).
- Auto-reload via
ConfigFileWatcher (auto_reload_configs, default true).
- Automatic backup zip on version upgrade.
- Legacy folder migration: copies data from
BlockProt or BlockProtPlus folders automatically on first boot after rename.
- SQLite usercache moved into the plugin data folder; old file is migrated automatically.
- Inactivity cleanup: removes protections owned by long-inactive players (
inactivity_cleanup_days, disabled by default).
- WorldEdit paste auto-lock (disabled by default).
- PlaceholderAPI placeholders:
%blockprot_global_block_count%, %blockprot_own_block_count%, %blockprot_default_friends%.
- Folia compatibility via FoliaLib.
- ViaVersion, ViaBackwards, and ViaRewind detection.
Commands
| Command |
Permission |
Description |
/bp user |
blockprot.user |
Main personal user menu or dialog |
/bp admin |
blockprot.user.admin |
Administrative control menu or dialog |
/bp friends |
blockprot.user |
Manage global default friends list |
/bp settings |
blockprot.user |
Personal player preferences interface |
/bp logs [here|player <name>|<page>] |
blockprot.user / Admin |
View access audit logs for self, targeted block, or another player |
/bp transferall <player> |
blockprot.user |
Transfer ownership of all your protected blocks to another player |
/bp lockables |
blockprot.user.admin |
Paged GUI listing all blocks and entities with active/inactive status |
/bp tiers |
blockprot.user.admin or blockprot.user.admin.owner |
Staff roles GUI and custom permissions manager |
/bp info <player> |
blockprot.user.admin |
All blocks owned by a player with teleport links |
/bp unlock <player> |
blockprot.user.admin |
Inspect or remove any player's protections (console: lists them) |
/bp protdel [world] |
blockprot.user.admin |
Bulk delete protections in a world with undo support |
/bp reload |
blockprot.user.admin |
Reload all config files and merge missing keys |
/bp update |
blockprot.user.admin |
Check and download GitHub release updates |
/bp integrations |
blockprot.user.admin |
Inspect status of all third-party integrations |
/bp recommended <blocks|config|all> |
blockprot.user.admin.owner |
Apply recommended configuration profiles |
/bp debug run |
blockprot.user.admin or blockprot.debug |
Run internal diagnostics (also from the console) |
Permissions
| Permission |
Default |
Description |
blockprot.user |
true |
All standard player features |
blockprot.user.admin |
op |
Admin commands and GUIs |
blockprot.user.admin.t1 |
false |
Low staff tier (block lists, read-only block info and audit logs) |
blockprot.user.admin.t2 |
false |
Medium staff tier (unlock, lockables, break protected blocks) |
blockprot.user.admin.t3 |
false |
High staff tier (world protection deletion, config, debug) |
blockprot.user.admin.owner |
op |
Full owner control and staff role assignment |
blockprot.lockmax |
false |
Exempt from the block count limit (unlimited) |
blockprot.locklimit.<N> |
false |
Per-player cap override (e.g. blockprot.locklimit.500) |
blockprot.blocks.tp |
op |
Teleport to blocks from stats and admin GUIs |
blockprot.debug |
op |
Access to /bp debug |
The staff tier nodes only apply with admin_tiers.enabled: true.
Compatibility
|
|
| Minecraft |
1.21.7 - 26.3 (detected numerically at runtime) |
| Server software |
Paper, Purpur, Folia |
| Java |
21+ required (JDK 25 toolchain) |
| MySQL |
MySQL 8+, MariaDB 10.5+ (optional) |
| Languages |
25 languages on GitLocalize: AR, CS, DE, EN, ES, FI, FR, HE, HU, ID, IT, JA, KO, NL, PL, PT-BR, RO, RU, SK, SV, TH, TR, UK, ZH-CN, ZH-TW |
Integrations
Towny, WorldGuard, Zelly's Guard, Lands, ClaimChunk, GriefPrevention, Residence, PlaceholderAPI, SkinsRestorer, WorldEdit/FAWE, Floodgate/Geyser, ViaVersion/ViaBackwards/ViaRewind, Folia.
Install
Place the JAR in plugins/ and restart. Requires Java 21+ and Paper, Purpur, or Folia 1.21.7 - 26.3. On upgrade, config keys are migrated automatically: no manual edits required.
Documentation
Repository:
Issues and contributions:
License: GNU General Public License v3 - based on BlockProt by spnda.
评论 0
登录后参与评分
还没有评论,来抢沙发吧