ChestProtect
一款简单而强大的 Minecraft 插件,通过基于告示牌的归属权系统和请求系统来保护箱子。
作者:juicyyfruittsnackss - dsc.gg/fruitsnacks
功能
- 简单的基于告示牌的保护:通过在告示牌上放置
:username: 格式的文本保护箱子
- 直接认领箱子:使用
/claimchest 命令直接认领箱子
- 基于请求的访问权限:玩家可以申请受保护箱子的临时访问权限
- 交互式聊天组件:为箱子所有者提供可点击的接受/拒绝按钮
- 权限系统:针对不同功能提供细粒度的权限节点
- 可配置的消息:所有消息均可在配置文件中自定义
- 优化的性能:极低的服务器资源占用
- 兼容 Paper 和 Spigot:适用于 Paper、Spigot 及其他分支版本
安装
- 下载 ChestProtect 最新版本
- 选择与你的 Minecraft 版本匹配的 JAR 文件(例如,Minecraft 1.21.4 对应
ChestProtect-1.0.0-mc1.21.4.jar)
- 将 JAR 文件放入服务器的
plugins 文件夹中
- 重启服务器或使用插件管理器加载该插件
- 首次运行时会自动生成配置文件
用法
保护箱子
方法 1:使用告示牌
- 在世界中放置一个箱子
- 在箱子的任意一面放置一个告示牌
- 在告示牌的任意一行写入
:username:(将 username 替换为你的名字)
- 告示牌将自动格式化以显示其已受保护
方法 2:使用认领命令
- 在世界中放置一个箱子
- 在箱子的任意一面放置一个告示牌(可以为空白)
- 看向箱子并输入
/claimchest
- 告示牌将自动格式化以显示其已受保护
申请访问权限
- 尝试打开一个受保护的箱子(你会收到提示它已受保护的消息)
- 点击建议的命令或手动输入
/openrequest <owner>
- 所有者将收到带有可点击“接受”/“拒绝”按钮的通知
- 如果获得批准,你将获得一次打开该箱子的临时权限
解锁自己的箱子
- 直视你受保护的箱子
- 输入
/unlockchest
- 箱子的保护将被移除,任何人都可以访问它
命令
/openrequest <player> - 申请访问玩家的受保护箱子
/acceptrequest <player> - 接受箱子访问请求
/denyrequest <player> - 拒绝箱子访问请求
/unlockchest - 移除你正注视的箱子的保护
/claimchest - 认领并用附着的告示牌保护一个箱子
权限
chestprotect.request - 允许申请箱子访问权限(默认:true)
chestprotect.accept - 允许接受箱子访问请求(默认:true)
chestprotect.deny - 允许拒绝箱子访问请求(默认:true)
chestprotect.protect - 允许保护箱子(默认:true)
chestprotect.unlock - 允许解锁自己受保护的箱子(默认:true)
chestprotect.protect.others - 允许保护其他玩家的箱子(默认:op)
chestprotect.admin.unlock - 允许解锁任何受保护的箱子(默认:op)
chestprotect.admin - 管理所有受保护箱子的管理员访问权限(默认:op)
配置
插件的配置存储在 plugins/ChestProtect/config.yml 中。你可以修改请求超时时间以及向玩家显示的所有消息。
# 访问请求保持有效的时长(秒)
request_timeout: 60
# 消息配置
# 使用 & 表示颜色代码,{0}、{1} 等表示参数
messages:
prefix: "&8[&6ChestProtect&8] &r"
# 错误消息、成功消息等
# 请参阅默认配置文件查看所有可用选项
版本兼容性
ChestProtect 完全兼容 PaperMC,并已在 Minecraft 1.21.4 上经过测试。它采用推荐的插件开发最佳实践,并在可能的情况下避免使用任何已弃用的 API 方法。
JAR 文件的命名遵循其所构建对应的 Minecraft 版本(例如 ChestProtect-1.0.0-mc1.21.4.jar),便于你为服务器选择正确的版本。
支持
如需支持、功能请求或 Bug 报告,请加入我们的 Discord 服务器:dsc.gg/fruitsnacks。
致谢
由 juicyyfruittsnackss 创建。访问 dsc.gg/fruitsnacks 获取更多插件和支持。
ChestProtect
A simple yet powerful Minecraft plugin for protecting chests with sign-based ownership and request system.
Made by juicyyfruittsnackss - dsc.gg/fruitsnacks
Features
- Simple Sign-Based Protection: Protect chests by placing a sign with
:username: format
- Direct Chest Claiming: Claim chests directly using the
/claimchest command
- Request-Based Access: Players can request temporary access to protected chests
- Interactive Chat Components: Clickable accept/deny buttons for chest owners
- Permission System: Granular permission nodes for different functionality
- Configurable Messages: All messages can be customized in the config
- Optimized Performance: Minimal server resource usage
- Paper and Spigot Compatible: Works with Paper, Spigot, and other forks
Installation
- Download the latest version of ChestProtect
- Choose the JAR file that matches your Minecraft version (e.g.,
ChestProtect-1.0.0-mc1.21.4.jar for Minecraft 1.21.4)
- Place the JAR file in your server's
plugins folder
- Restart your server or use a plugin manager to load the plugin
- Configuration files will be automatically generated on first run
Usage
Protecting a Chest
Method 1: Using Signs
- Place a chest in the world
- Place a sign on any side of the chest
- Write
:username: on any line of the sign (replace username with your name)
- The sign will automatically format to show it's protected
Method 2: Using the Claim Command
- Place a chest in the world
- Place a sign on any side of the chest (can be blank)
- Look at the chest and type
/claimchest
- The sign will automatically format to show it's protected
Requesting Access
- Try to open a protected chest (you'll be shown a message that it's protected)
- Click on the suggested command or type
/openrequest <owner> manually
- The owner will receive a notification with clickable Accept/Deny buttons
- If accepted, you'll receive temporary access to open the chest once
Unlocking Your Own Chest
- Look directly at your protected chest
- Type
/unlockchest
- The chest protection will be removed, and anyone can access it
Commands
/openrequest <player> - Request access to a player's protected chests
/acceptrequest <player> - Accept a chest access request
/denyrequest <player> - Deny a chest access request
/unlockchest - Remove protection from a chest you're looking at
/claimchest - Claim and protect a chest with an attached sign
Permissions
chestprotect.request - Allows requesting chest access (default: true)
chestprotect.accept - Allows accepting chest access requests (default: true)
chestprotect.deny - Allows denying chest access requests (default: true)
chestprotect.protect - Allows protecting chests (default: true)
chestprotect.unlock - Allows unlocking your own protected chests (default: true)
chestprotect.protect.others - Allows protecting chests for other players (default: op)
chestprotect.admin.unlock - Allows unlocking any protected chest (default: op)
chestprotect.admin - Admin access to all protected chests (default: op)
Configuration
The plugin's configuration is stored in plugins/ChestProtect/config.yml. You can modify the request timeout duration and all messages shown to players.
# Time in seconds that access requests will remain valid
request_timeout: 60
# Messages configuration
# Use & for color codes, {0}, {1}, etc. for parameters
messages:
prefix: "&8[&6ChestProtect&8] &r"
# Error messages, success messages, etc.
# See the default config for all available options
Version Compatibility
ChestProtect is fully compatible with PaperMC, and has been tested with Minecraft 1.21.4. It uses recommended best practices for plugin development and avoids any deprecated API methods where possible.
JAR files are named according to the Minecraft version they were built for (e.g., ChestProtect-1.0.0-mc1.21.4.jar), making it easy to select the correct version for your server.
Support
For support, feature requests, or bug reports, please join our Discord server at dsc.gg/fruitsnacks.
Credits
Created by juicyyfruittsnackss. Visit dsc.gg/fruitsnacks for more plugins and support.
评论 0
登录后参与评分
还没有评论,来抢沙发吧