一款现代化的 Paper 插件,允许每位玩家独立控制自己的死亡物品和掉落经验,而无需修改全局游戏规则。
告别服务器范围的 keepInventory 游戏规则!PerPlayerKeepInventory 为服务器管理员和玩家提供了细粒度的控制。玩家可以自由启用或禁用自己的死亡掉落,且设置会被安全保存并在服务器重启后持久保留。
✨ 特性
- ? 玩家独立设置:每位玩家的死亡掉落状态均独立存储和计算,互不干扰。
- ⚙️ 可预测的行为:当玩家没有自定义设置时,会自动回退到世界的
keepInventory 游戏规则。
- ?️ 细粒度权限控制:提供完整的权限节点集,用于精确控制谁可以查看或修改自己或他人的状态。
- ? 数据持久化:使用玩家的 PersistentDataContainer 来存储设置,确保数据安全可靠,因为数据会随着玩家的加载和保存而自动同步。
? 下载与安装
- 从本页面下载最新的
.jar 文件。
- 将下载的
.jar 文件放入 Paper 服务器的 plugins/ 目录中。
- 重启或重载你的服务器。
- 插件将自动生成默认配置文件 (
config.yml),你可以根据需要进行调整。
前置要求:此插件需要运行在 Paper 1.21.8 或更高版本的服务器上。其他版本未经测试。
? 命令与权限
插件的主命令默认为 /keepinv(可在配置文件中更改,需重启服务器生效)。
命令列表
| 命令 |
描述 |
所需权限 (默认) |
/keepinv get [player] |
查看你自己(或指定玩家)的死亡掉落状态。 |
keepinv.get (自身)
keepinv.get.others (他人) |
/keepinv set <true|false> [player] |
设置你自己(或指定玩家)的死亡掉落状态。 |
keepinv.set (自身)
keepinv.set.others (他人) |
/keepinv toggle [player] |
切换你自己(或指定玩家)的死亡掉落状态。 |
keepinv.toggle (自身)
keepinv.toggle.others (他人) |
/keepinv reset [player] |
将你自己的(或指定玩家的)设置重置为继承世界默认规则。 |
keepinv.reset (自身)
keepinv.reset.others (他人) |
/keepinv help |
显示此帮助信息。 |
无 |
权限节点
所有权限均可在 plugin.yml 中查看。默认情况下 (default: op),只有服务器操作员(管理员)拥有访问权限。
| 权限节点 |
描述 |
keepinv.use |
使用基础 /keepinv 命令的权限。 |
keepinv.get |
查看自己状态的权限。 |
keepinv.get.others |
查看其他玩家状态的权限。 |
keepinv.set |
设置自己状态的权限。 |
keepinv.set.others |
设置其他玩家状态的权限。 |
keepinv.toggle |
切换自己状态的权限。 |
keepinv.toggle.others |
切换其他玩家状态的权限。 |
keepinv.reset |
重置自己设置的权限。 |
keepinv.reset.others |
重置其他玩家设置的权限。 |
⚙️ 配置
首次运行后,插件将在 plugins/PerPlayerKeepInventory/ 目录下生成一个 config.yml 文件。
# PerPlayerKeepInventory Configuration File
rootCommandNodeName: "keepInv" # 主命令的名称。重启服务器后生效。
A modern Paper plugin that allows each player to independently control their own death item and experience drop, without modifying global game rules.
Say goodbye to the server-wide keepInventory game rule! PerPlayerKeepInventory offers granular control for server administrators and players. Players can freely choose to enable or disable their own death drops, and their settings are securely saved and persist after server restarts.
✨ Features
- ? Per-Player Settings: Each player's death drop status is stored and calculated independently, without interfering with others.
- ⚙️ Predictable Behavior: Automatically falls back to the world's
keepInventory game rule when a player has no custom setting.
- ?️ Granular Permission Control: Provides a complete set of permission nodes for precise control over who can view or modify their own or others' status.
- ? Data Persistence: Uses the player's PersistentDataContainer to store settings, ensuring safety and reliability as data is saved and loaded with the player.
? Download & Installation
- Download the latest
.jar file from this page.
- Place the downloaded
.jar file into your Paper server's plugins/ directory.
- Restart or reload your server.
- The plugin will automatically generate a default configuration file (
config.yml), which you can adjust as needed.
Prerequisite: This plugin requires a server running Paper 1.21.8 or higher. Other versions are untested.
? Commands & Permissions
The plugin's main command is /keepinv by default (can be changed in the configuration file, requires a server restart to take effect).
Command List
| Command |
Description |
Required Permission (Default) |
/keepinv get [player] |
Check your own (or a specified player's) death drop status. |
keepinv.get (self)
keepinv.get.others (others) |
/keepinv set <true|false> [player] |
Set the death drop status for yourself (or a specified player). |
keepinv.set (self)
keepinv.set.others (others) |
/keepinv toggle [player] |
Toggle the death drop status for yourself (or a specified player). |
keepinv.toggle (self)
keepinv.toggle.others (others) |
/keepinv reset [player] |
Reset your own (or a specified player's) setting to inherit the world's default rule. |
keepinv.reset (self)
keepinv.reset.others (others) |
/keepinv help |
Display this help information. |
None |
Permission Nodes
All permissions can be viewed in plugin.yml. By default (default: op), only server operators (admins) have access.
| Permission Node |
Description |
keepinv.use |
Permission to use the base /keepinv command. |
keepinv.get |
Permission to view your own status. |
keepinv.get.others |
Permission to view another player's status. |
keepinv.set |
Permission to set your own status. |
keepinv.set.others |
Permission to set another player's status. |
keepinv.toggle |
Permission to toggle your own status. |
keepinv.toggle.others |
Permission to toggle another player's status. |
keepinv.reset |
Permission to reset your own setting. |
keepinv.reset.others |
Permission to reset another player's setting. |
⚙️ Configuration
After the first run, the plugin will generate a config.yml file in the plugins/PerPlayerKeepInventory/ directory.
# PerPlayerKeepInventory Configuration File
rootCommandNodeName: "keepInv" # The name of the main command. Takes effect after a server restart.
评论 0
登录后参与评分
还没有评论,来抢沙发吧