? Backpack
支持的加载器: Bukkit、Spigot、Paper、Purpur、Folia
支持版本: 1.21.x、26.1.x、26.2.x(Java 21+)
? 兼容性与核心支持
| 加载器 |
兼容性状态 |
备注 |
| Paper / Purpur |
? 原生 100% 支持 |
推荐。性能最佳并支持 MiniMessage。 |
| Spigot / Bukkit |
? 原生 100% 支持 |
完全兼容。传统颜色代码和 API 完美运行。 |
| Folia |
? 原生 100% 支持 |
完全支持! 使用基于区域的调度,防止线程错误。 |
✨ 功能特性
- 6 种背包尺寸 — 从 1 行(9 格)到 6 行(54 格)
- 基于权限的尺寸控制 — 插件会自动给予玩家其拥有权限的最大尺寸背包
- 死亡清空 — 默认情况下,玩家死亡时背包物品会丢失(可通过
backpack.keep 权限配置)
- 管理工具 — 实时查看和编辑任何玩家的背包,即使他们离线
- 按玩家存储 — 每个玩家的背包独立存储,以实现最佳性能
- 异步保存 — 所有文件 I/O 均在主线程之外运行,以防止卡顿
- 自动保存 — 定期保存以防止物品丢失(可配置间隔时间)
- MiniMessage 支持 — 所有消息中均支持完整的十六进制颜色、渐变色和富文本格式
- PlaceholderAPI 支持 — 可在背包标题中使用任何 PAPI 占位符(可选)
- 音效 — 可配置的打开/关闭音效
- 完全可配置 — 每条消息、标题、音效和间隔时间均可在
config.yml 中更改
- 轻量级 — 无需依赖项,针对大型服务器进行了优化
? 命令
| 命令 |
描述 |
/backpack |
打开你的背包 |
/bp |
/backpack 的别名 |
/bpack |
/backpack 的别名 |
/backpack reload |
重新加载插件配置 |
/backpack <player> |
打开其他玩家的背包(实时编辑) |
/backpack give <player> <rows> |
显示如何授予背包权限的信息 |
? 权限
玩家权限
| 权限 |
描述 |
默认值 |
backpack.row.1 |
1 行 — 9 格 |
false |
backpack.row.2 |
2 行 — 18 格 |
false |
backpack.row.3 |
3 行 — 27 格 |
false |
backpack.row.4 |
4 行 — 36 格 |
false |
backpack.row.5 |
5 行 — 45 格 |
false |
backpack.row.6 |
6 行 — 54 格 |
false |
backpack.keep |
死亡时保留背包物品 |
false |
工作原理: 插件会自动检测玩家拥有的最高行数权限。
例如,如果玩家拥有 backpack.row.1、backpack.row.2 和 backpack.row.3,他们的背包将是 27 格(3 行)。
如果玩家没有任何 backpack.row.* 权限,则 /backpack 命令将无法打开背包,并将看到“无权限”的消息。
死亡行为
默认情况下,当玩家死亡时,其背包内容会被清空。若要允许某些玩家(如捐赠者、VIP)在死亡时保留背包物品,请授予他们 backpack.keep 权限。
管理员权限
| 权限 |
描述 |
默认值 |
backpack.admin |
所有管理功能 |
op |
backpack.reload |
重新加载配置文件 |
op |
backpack.bypass |
绕过限制(始终获得最大尺寸) |
op |
backpack.view |
查看和编辑其他玩家的背包 |
op |
backpack.give |
使用给予信息命令 |
op |
backpack.* |
授予上述所有权限 + 所有行数 + 死亡保留 |
op |
⚙️ 配置
插件首次运行时会在 config.yml 生成带有完整注释的配置。以下是关键选项:
| 设置项 |
描述 |
默认值 |
prefix |
消息前缀(支持 MiniMessage) |
渐变 "Backpack" |
messages.no-permission |
玩家无背包权限时显示 |
可配置 |
messages.death-clear |
背包在死亡时被清空时显示 |
可配置 |
gui.title |
背包窗口标题(支持 %player%) |
<gold>%player%'s Backpack |
sounds.open |
打开背包时的音效 |
BLOCK_CHEST_OPEN |
sounds.close |
关闭背包时的音效 |
BLOCK_CHEST_CLOSE |
autosave.interval |
自动保存间隔(秒) |
300(5 分钟) |
cache.timeout |
离线 X 分钟后卸载背包 |
10 |
debug |
启用调试日志 |
false |
所有消息均支持 MiniMessage 格式,包括十六进制颜色如 <color:#FF5555> 和渐变色如 <gradient:#FF6B6B:#4ECDC4>。
? 安装
- 从
versions 文件夹中选择与您的服务器加载器和版本匹配的 JAR 文件:
- 适用于 Paper / Purpur / Folia / Spigot / Bukkit
- 适用于 1.21.x / 26.1.x / 26.2
- 将其放入服务器的
plugins/ 文件夹(或等效的 mods/plugins 目录)
- 重启服务器
- 编辑
plugins/Backpack/config.yml 以自定义消息和设置
- 使用您的权限插件(例如 LuckPerms)向玩家授予
backpack.row.* 权限
LuckPerms 示例设置:
/lp group default permission set backpack.row.3 true # 所有玩家获得 3 行
/lp group vip permission set backpack.row.6 true # VIP 获得 6 行
/lp group vip permission set backpack.keep true # VIP 死亡时保留物品
? 存储
每个玩家的背包都存储为单独的 YAML 文件:
plugins/Backpack/data/<uuid>.yml
这意味着:
- ✅ 无需数据库设置
- ✅ 易于备份和迁移
- ✅ 大量玩家数量下无性能问题
- ✅ 所有保存均为异步操作(无卡顿)
❓ 常见问题
Q: 如果服务器崩溃会发生什么?
A: 插件会定期自动保存所有背包(默认:每 5 分钟)。正常关机时,所有内容会立即保存。
Q: 管理员可以编辑离线玩家的背包吗?
A: 是的!使用 /backpack <playername> 命令并拥有 backpack.view 权限,即可打开并编辑任何玩家的背包,即使他们处于离线状态。
问:该插件会导致延迟吗?
答:不会。所有文件操作均为异步执行。该插件专为拥有数百名玩家的大型服务器设计。
问:必须安装 PlaceholderAPI 吗?
答:不需要。PlaceholderAPI 是可选的。如果已安装,您可以在背包标题中使用任何 PAPI 占位符。即使不安装它,插件也能完美运行。
问:玩家死亡时会丢失背包物品吗?
答:默认情况下会丢失。授予 backpack.keep 权限可以让玩家在死亡时保留背包物品。
? 支持
如果您遇到任何问题,请提供以下信息以进行报告:
- 服务器版本(输入
/version)
- 插件版本
logs/latest.log 中的错误日志
- 重现问题的步骤
? Backpack
Supported Loaders: Bukkit, Spigot, Paper, Purpur, Folia
Supported Versions: 1.21.x, 26.1.x, 26.2.x (Java 21+)
? Compatibility & Core Support
| Loader |
Compatibility Status |
Notes |
| Paper / Purpur |
? 100% Native |
Recommended. Best performance and MiniMessage support. |
| Spigot / Bukkit |
? 100% Native |
Fully compatible. Legacy colors and API work perfectly. |
| Folia |
? 100% Native |
Fully supported! Uses region-based scheduling, preventing thread errors. |
✨ Features
- 6 backpack sizes — from 1 row (9 slots) up to 6 rows (54 slots)
- Permission-based sizing — the plugin automatically gives players the largest backpack they have permission for
- Death clearing — backpack items are lost on death by default (configurable with
backpack.keep permission)
- Admin tools — view and edit any player's backpack in real-time, even when they're offline
- Per-player storage — each player's backpack is stored separately for maximum performance
- Async saving — all file I/O runs off the main thread to prevent lag
- Auto-save — periodic saves to prevent item loss (configurable interval)
- MiniMessage support — full hex color, gradient, and rich text formatting in all messages
- PlaceholderAPI support — use any PAPI placeholder in the backpack title (optional)
- Sound effects — configurable open/close sounds
- Fully configurable — every message, title, sound, and interval can be changed in
config.yml
- Lightweight — no dependencies required, optimized for large servers
? Commands
| Command |
Description |
/backpack |
Open your backpack |
/bp |
Alias for /backpack |
/bpack |
Alias for /backpack |
/backpack reload |
Reload the plugin configuration |
/backpack <player> |
Open another player's backpack (live editing) |
/backpack give <player> <rows> |
Show info on how to grant backpack permissions |
? Permissions
Player Permissions
| Permission |
Description |
Default |
backpack.row.1 |
1 row — 9 slots |
false |
backpack.row.2 |
2 rows — 18 slots |
false |
backpack.row.3 |
3 rows — 27 slots |
false |
backpack.row.4 |
4 rows — 36 slots |
false |
backpack.row.5 |
5 rows — 45 slots |
false |
backpack.row.6 |
6 rows — 54 slots |
false |
backpack.keep |
Keep backpack items on death |
false |
How it works: The plugin automatically detects the highest row permission a player has.
For example, if a player has backpack.row.1, backpack.row.2, and backpack.row.3, their backpack will be 27 slots (3 rows).
If a player has no backpack.row.* permission, the /backpack command will not open and they will see a "no permission" message.
Death Behavior
By default, when a player dies, their backpack contents are cleared. To let certain players (e.g. donors, VIPs) keep their backpack items on death, grant them the backpack.keep permission.
Admin Permissions
| Permission |
Description |
Default |
backpack.admin |
All admin features |
op |
backpack.reload |
Reload configuration files |
op |
backpack.bypass |
Bypass restrictions (always gets max size) |
op |
backpack.view |
View and edit other players' backpacks |
op |
backpack.give |
Use the give info command |
op |
backpack.* |
Grants all permissions above + all rows + keep |
op |
⚙️ Configuration
The plugin generates a fully commented config.yml on first run. Here are the key options:
| Setting |
Description |
Default |
prefix |
Message prefix (MiniMessage supported) |
Gradient "Backpack" |
messages.no-permission |
Shown when player has no backpack permission |
Configurable |
messages.death-clear |
Shown when backpack is cleared on death |
Configurable |
gui.title |
Backpack window title (%player% supported) |
<gold>%player%'s Backpack |
sounds.open |
Sound when opening backpack |
BLOCK_CHEST_OPEN |
sounds.close |
Sound when closing backpack |
BLOCK_CHEST_CLOSE |
autosave.interval |
Auto-save interval in seconds |
300 (5 min) |
cache.timeout |
Unload offline backpacks after X minutes |
10 |
debug |
Enable debug logging |
false |
All messages support MiniMessage formatting including hex colors like <color:#FF5555> and gradients like <gradient:#FF6B6B:#4ECDC4>.
? Installation
- Choose the matching JAR file for your server loader and version from the
versions folder:
- For Paper / Purpur / Folia / Spigot / Bukkit
- For 1.21.x / 26.1.x / 26.2
- Place it in your server's
plugins/ folder (or equivalent mods/plugins directory)
- Restart your server
- Edit
plugins/Backpack/config.yml to customize messages and settings
- Use your permissions plugin (e.g., LuckPerms) to grant
backpack.row.* permissions to players
Example LuckPerms setup:
/lp group default permission set backpack.row.3 true # All players get 3 rows
/lp group vip permission set backpack.row.6 true # VIPs get 6 rows
/lp group vip permission set backpack.keep true # VIPs keep items on death
? Storage
Each player's backpack is stored as an individual YAML file:
plugins/Backpack/data/<uuid>.yml
This means:
- ✅ No database setup needed
- ✅ Easy to backup and migrate
- ✅ No performance issues with large player counts
- ✅ All saves happen asynchronously (no lag)
❓ FAQ
Q: What happens if the server crashes?
A: The plugin auto-saves all backpacks periodically (default: every 5 minutes). On clean shutdown, everything is saved immediately.
Q: Can admins edit offline player backpacks?
A: Yes! Use /backpack <playername> with the backpack.view permission to open and edit any player's backpack, even if they're offline.
Q: Does the plugin cause lag?
A: No. All file operations run asynchronously. The plugin is designed for servers with hundreds of players.
Q: Is PlaceholderAPI required?
A: No. PlaceholderAPI is optional. If installed, you can use any PAPI placeholder in the backpack title. The plugin works perfectly without it.
Q: Do players lose backpack items on death?
A: Yes, by default. Grant the backpack.keep permission to let players keep their backpack items on death.
? Support
If you encounter any issues, please report them with:
- Server version (
/version)
- Plugin version
- Error logs from
logs/latest.log
- Steps to reproduce the issue
评论 0
登录后参与评分
还没有评论,来抢沙发吧