为 Minecraft 服务器提供简单、强大的容器保护。 使用带有 [private] 或 [public] 的墙壁告示牌来保护箱子和 barrels。无需复杂设置——只需放置一个
告示牌,你的容器就受到保护了。
这个模组有什么用?
Private Chests 是一个 服务端 Fabric 模组,允许玩家保护箱子和 barrels 免受其他玩家的干扰。
在箱子或 barrel 上附着墙壁告示牌并写上:
[private]使其成为仅所有者可用,并可选地共享访问权限[public]让每个人都能打开它,同时仍防止破坏行为
模组自动处理保护——阻止未经授权的访问,防止箱子扩展漏洞,阻止漏斗偷窃,以及保护容器免受爆炸和 火灾的影响。
仅限服务端 - 不需要客户端模组。玩家可以使用原版客户端加入服务器。
功能特性
? 简单的基于告示牌的保护
- 在任何箱子或 barrel 上放置墙壁告示牌
- 在第 1 行写入
[private]或[public] [private]支持在其他行添加额外的玩家名称- 支持逗号分隔的名称:
Player1, Player2 - 可以使用告示牌的正面和背面
?️ 全面的安全防护
- 私有容器 - 只有所有者和列出的玩家可以打开它们
- 公共容器 - 任何人都可以打开它们,但它们仍然受到保护
- 防止箱子扩展漏洞 - 非所有者不能将箱子放置在受保护的容器旁边
- 阻止漏斗偷窃 - 漏斗无法移动受保护容器中的物品进出
- 防爆保护 - TNT 和苦力怕不会摧毁受保护的容器
- 防火保护 - 火不会蔓延到受保护的容器
- 告示牌保护 - 只有所有者或管理员可以编辑或破坏保护告示牌
? 对玩家友好的功能
- 双箱支持 - 自动处理双箱情况
- 所有者扩展 - 所有者可以将单个箱子扩展为双箱
- 轻松移除 - 直接破坏你自己的受保护箱子/容器(自动移除保护)
- 无需玩家命令 - 玩家只需使用告示牌
? 跨平台兼容
- 完整的 Bedrock 支持 通过 Floodgate/Geyser
- Bedrock 玩家可以创建和使用受保护的容器
- 可配置 Bedrock 玩家的用户名前缀
⚙️ 管理工具
用于服务器管理的命令:
/private_chests list/private_chests list public/private_chests list private/private_chests list_in_area [radius]/private_chests list_in_area [radius] public/private_chests list_in_area [radius] private/private_chests info <x> <y> <z>/private_chests unlock <x> <y> <z>/private_chests cleanup- 别名:
/pchests
使用方法
创建私有容器
- 放置一个箱子或 barrel
- 附着一个墙壁告示牌
- 写入:
[private] PlayerName1 Player2, Player3
只有你和列出的玩家可以打开它。
创建公共容器
- 放置一个箱子或 barrel
- 附着一个墙壁告示牌
- 写入:
[public]
任何人都可以打开它,但只有告示牌所有者或管理员可以管理保护。
告示牌格式规则
[private]和[public]必须仅在 第 1 行- 标记是 不区分大小写的
- 标记可以在 正面或背面
[private]允许在其他行输入用户名- 所有者自动拥有访问权限
管理保护
要编辑访问权限:
- 编辑告示牌文本
- 只有所有者或管理员可以编辑活动的保护告示牌
要移除保护:
- 从活动告示牌中移除保护标记
- 或者直接破坏你自己的受保护箱子/容器
休眠告示牌:
- 如果受保护的容器已经有活动的保护告示牌,额外的
[private]或[public]告示牌不会自动接管 - 只有在容器未受保护且告示牌所有者/管理员重新激活它们时,它们才会变为活动状态
管理命令
所有命令都需要管理员权限(可配置,默认等级 3)。
/private_chests list
显示服务器上的受保护容器。
/private_chests list public
仅显示受保护的公共容器。
/private_chests list private
仅显示受保护的私有容器。
/private_chests list_in_area [radius]
显示你位置附近的受保护容器。
/private_chests info <x> <y> <z>
显示详细信息:
- 容器类型和位置
- 所有者名称
- 保护模式 (
private或public) - 允许的玩家
- 创建时间戳
- 最后更新时间戳
/private_chests unlock <x> <y> <z>
强制移除容器的保护。
/private_chests cleanup
移除加载区块中过期的活动锁记录和休眠告示牌记录。
配置
配置文件:config/private-chests.json
{
"floodgatePrefix": ".",
"adminPermissionLevel": 3,
"maxLocksPerPlayer": 0,
"listMaxEntries": 50,
"listPreviewEntries": 20,
"disableProtectionIfOwnerBanned": true
}
| 选项 | 默认值 | 描述 |
|---|---|---|
| floodgatePrefix | . | Bedrock 玩家的前缀 (例如, .BedrockPlayer) |
| adminPermissionLevel | 3 | 绕过锁定的权限等级 (0-4) |
| maxLocksPerPlayer | 0 | 每个玩家最大受保护容器数;0 = 无限 |
| listMaxEntries | 50 | /list 命令在缩写前的最大锁定数量 |
| listPreviewEntries | 20 | 缩写时显示的数量 |
| disableProtectionIfOwnerBanned | true | 如果所有者被封禁,则移除保护 |
无效值将在启动时自动更正。
已知问题
由于 Minecraft 客户端预测机制,可能会出现一些轻微的画面异常。
告示牌文字消失
当未授权玩家试图破坏受保护的告示牌时:
- 服务器端告示牌保持完好
- 客户端文字可能会暂时消失
- 修复方法:左键或右键点击该告示牌以刷新它
物品在受阻时“消失”
当尝试在受保护的容器附近放置方块时:
- 服务器会正确阻止放置行为
- 物品栏中的该物品可能会暂时消失
- 修复方法:切换到该物品栏槽位或移动该物品
- 物品实际上从未丢失
这些仅为客户端视觉层面的问题。
技术细节
- 仅服务端运行
- 持久化数据存储在 world/data/private-chests.dat 中
- 针对破坏告示牌操作提供数据包级别保护
- 高效的查找与缓存机制
- 支持 Minecraft 26.1.1
安装说明
服务端安装
- 下载模组 JAR 文件
- 将其放入服务端的 mods 文件夹
- 确保已安装 Fabric API
- 启动服务端
- (可选)调整 config/private-chests.json 配置文件
Simple, powerful container protection for your Minecraft server. Protect chests and barrels using wall signs with [private] or [public]. No complicated setup - just place a
sign and your container is protected.
What Does This Mod Do?
Private Chests is a server-side Fabric mod that lets players protect chests and barrels from other players.
Attach a wall sign to a chest or barrel and write:
[private]to make it owner-only, with optional shared access[public]to let everyone open it while still keeping it protected from griefing
The mod handles protection automatically - blocking unauthorized access, preventing chest expansion exploits, stopping hopper theft, and protecting containers from explosions and fire.
Server-side only - no client mod required. Players can join with vanilla clients.
Features
? Simple Sign-Based Protection
- Place a wall sign on any chest or barrel
- Write
[private]or[public]on line 1 [private]supports additional player names on the remaining lines- Supports comma-separated names:
Player1, Player2 - Use both sides of the sign
?️ Comprehensive Security
- Private containers - only the owner and listed players can open them
- Public containers - anyone can open them, but they stay protected
- Prevents chest expansion exploits - non-owners can't place chests next to protected containers
- Stops hopper theft - hoppers can't move items in or out of protected containers
- Explosion protection - TNT and creepers won't destroy protected containers
- Fire protection - fire can't spread to protected containers
- Sign protection - only the owner or admin can edit or break protection signs
? Player-Friendly Features
- Double chest support - automatically handles double chests
- Owner expansion - owners can extend their single chest to double
- Easy removal - break your own protected chest/container directly (auto-removes protection)
- No player commands needed - players just use signs
? Cross-Platform Compatible
- Full Bedrock support via Floodgate/Geyser
- Bedrock players can create and use protected containers
- Configurable username prefix for Bedrock players
⚙️ Admin Tools
Commands for server management:
/private_chests list/private_chests list public/private_chests list private/private_chests list_in_area [radius]/private_chests list_in_area [radius] public/private_chests list_in_area [radius] private/private_chests info <x> <y> <z>/private_chests unlock <x> <y> <z>/private_chests cleanup- Alias:
/pchests
How to Use
Creating a Private Container
- Place a chest or barrel
- Attach a wall sign
- Write:
[private] PlayerName1 Player2, Player3
Only you and the listed players can open it.
Creating a Public Container
- Place a chest or barrel
- Attach a wall sign
- Write:
[public]
Anyone can open it, but only the sign owner or an admin can manage the protection.
Sign Format Rules
[private]and[public]must be on line 1 only- Marker is case-insensitive
- Marker can be on the front or back
[private]allows usernames on the remaining lines- Owner automatically has access
Managing Protection
To edit access:
- Edit the sign text
- Only the owner or an admin can edit the active protection sign
To remove protection:
- Remove the protection marker from the active sign
- Or break your own protected chest/container directly
Dormant signs:
- If a protected container already has an active protection sign, extra
[private]or[public]signs do not take over automatically - They only become active later if the container is unprotected and the sign owner/admin reactivates them
Admin Commands
All commands require admin permission (configurable, default level 3).
/private_chests list
Shows protected containers across the server.
/private_chests list public
Shows only public protected containers.
/private_chests list private
Shows only private protected containers.
/private_chests list_in_area [radius]
Shows protected containers near your location.
/private_chests info <x> <y> <z>
Shows detailed information:
- Container type and location
- Owner name
- Protection mode (
privateorpublic) - Allowed players
- Creation timestamp
- Last updated timestamp
/private_chests unlock <x> <y> <z>
Forcibly removes protection from a container.
/private_chests cleanup
Removes stale active lock records and dormant sign records in loaded chunks.
Configuration
Config file: config/private-chests.json
{
"floodgatePrefix": ".",
"adminPermissionLevel": 3,
"maxLocksPerPlayer": 0,
"listMaxEntries": 50,
"listPreviewEntries": 20,
"disableProtectionIfOwnerBanned": true
}
| Option | Default | Description |
|---|---|---|
| floodgatePrefix | . | Prefix for Bedrock players (e.g., .BedrockPlayer) |
| adminPermissionLevel | 3 | Permission level to bypass locks (0-4) |
| maxLocksPerPlayer | 0 | Max protected containers per player; 0 = unlimited |
| listMaxEntries | 50 | Max locks in /list before abbreviating |
| listPreviewEntries | 20 | Number shown when abbreviated |
| disableProtectionIfOwnerBanned | true | Remove protection if owner is banned |
Invalid values are automatically corrected on startup.
Known Issues
Due to Minecraft client-side prediction, some minor visual glitches may occur.
Sign Text Disappearing
When unauthorized players try to break a protected sign:
- The sign remains intact on the server
- Text may temporarily disappear on the client
- Fix: left-click or right-click the sign to refresh it
Item "Disappearing" When Blocked
When trying to place blocks near protected containers:
- The placement is correctly blocked by the server
- The item may temporarily disappear from the hotbar
- Fix: switch to that slot or move the item
- The item is never actually lost
These are client-side visual issues only.
Technical Details
- Server-side only
- Persistent data stored in world/data/private-chests.dat
- Packet-level protection for sign breaking
- Efficient lookup and caching
- Supports Minecraft 26.1.1
Installation
Server Installation
- Download the mod JAR
- Place it in your server's mods folder
- Make sure Fabric API is also installed
- Start the server
- (Optional) adjust config/private-chests.json
下载 Private Chests
下载 Private Chests
下载 Private Chests
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Private Chests
下载 Private Chests
下载 Private Chests
下载 Private Chests
下载 Private Chests
下载 Private Chests
26.3 版本的更新
- 修复了一个漏洞:通过在其他维度匹配坐标,可以移除他人的锁(现有锁会自动迁移)
- 修复了保护绕过问题:包括副手放置告示牌/箱子、漏斗插入,以及破坏保护告示牌或被禁玩家容器后遗留的过期锁
- 将已上锁的箱子扩展为双层箱子时,现在会同时保护两侧
- 配置加固:adminPermissionLevel 现在取值范围为 1–4(0 不再使所有玩家成为管理员);损坏的配置不再导致服务器崩溃
需要 Java 25+。现有配置和锁保持兼容,无需更改。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧