Keep Inventory Tweaks
Keep Inventory Tweaks 是一款适用于 Minecraft 的 Bukkit/Paper 插件,用于增强默认的 KeepInventory 游戏规则。它允许服务器管理员完全自定义谁在死亡时保留物品栏,支持针对每个玩家的开关、离线玩家以及全局世界行为。该插件旨在做到安全、灵活且易于使用,即使在 Geyser 环境下也能正常运行。
功能特性
- 可针对单个玩家启用或禁用 KeepInventory。
- 支持离线玩家。
- 自动进行安全的物品处理:被设置为不保留物品栏的玩家在死亡时会安全地掉落物品。
- 命令和选项支持完整的标签补全(Tab-completion)。
- 设置和玩家数据存储在 JSON 文件中,便于备份或修改。
命令
/keep_player_inventory update <player> <true|false>
- 切换某个玩家的 KeepInventory 状态。
- 仅对 OP 或拥有
keepinventory.update 权限的用户可用。
- 示例:
/keep_player_inventory update Notch true 将确保 Notch 在死亡后不会丢失物品。
/keep_player_inventory check [player]
- 检查你自己或其他玩家的 KeepInventory 状态。
- 只有 OP 或拥有相应权限的用户才能查看其他玩家的状态。
- 如果未指定玩家,则默认检查你自己的状态。
- 示例:
/keep_player_inventory check 将返回你当前的 keepinventory 状态。
/keep_player_inventory check Notch 将返回 Notch 当前的 keepinventory 状态。
安装
方法 1 - Releases(发布版本)
- 访问 Releases 页面,下载最新发布的版本。
- 将 .jar 文件添加到服务器目录下的
/plugins/ 文件夹中。
- 下次启动服务器时,Keep Inventory Tweaks 即已安装完毕。
方法 2 - Maven
- 下载并安装 Maven。
- 克隆或下载该项目。
- 进入项目所在目录,打开终端。
- 运行
mvn clean package 手动编译项目。
- 进入
/target/ 目录,将编译生成的 .jar 文件移动到服务器的 /plugins/ 文件夹中。
- 下次启动服务器时,Keep Inventory Tweaks 即已安装完毕。
权限配置
keepinventory.update — 允许为其他玩家切换 KeepInventory 状态。
- OP 用户自动拥有所有权限。
配置与数据存储
- 玩家设置以 JSON 文件格式存储在插件目录下。
- 插件保持所有数据的持久性,并支持离线玩家。
World-global(全局世界)行为确保服务器上所有世界的设置保持一致。
贡献代码
欢迎提交 Pull Requests 和 Issue!请确保代码遵循相同的结构和 JSON 存储规范。
许可证
Keep Inventory Tweaks 采用 MIT 许可证授权,要求注明出处。
你可以出于个人用途或服务器用途使用或修改此插件,但必须署名原作者 jiuhaywi。
查看许可证原文 点击这里
Keep Inventory Tweaks
Keep Inventory Tweaks is a Bukkit/Paper plugin for Minecraft that enhances the default KeepInventory gamerule. It allows server owners to fully customize who keeps their inventory on death, with support for per-player toggles, offline players, and world-global behavior. The plugin is designed to be safe, flexible, and easy to use, even with Geyser setups.
Features
- Enable or disable KeepInventory per player.
- Works with offline players.
- Automatic safe item handling: players set to not keep inventory will drop items safely at death.
- Full tab-completion for commands and options.
- Settings and player data stored in JSON files, making it easy to backup or modify.
Commands
/keep_player_inventory update <player> <true|false>
- Toggles the KeepInventory state for a player.
- Only available to OPs or users with
keepinventory.update permission.
- Examples:
/keep_player_inventory update Notch true will ensure Notch does not lose items upon death.
/keep_player_inventory check [player]
- Checks your own KeepInventory state or another player's.
- Only OPs or users with permission can check other players.
- If no player is specified, defaults to checking your own state.
- Examples:
/keep_player_inventory check will return your current keepinventory state.
/keep_player_inventory check Notch will return Notch's current keepinventory state.
Installation
Method 1 - Releases
- Go to the Releases, and download the latest release.
- Add the .jar file to your
/plugins/ folder on your server.
- Keep Inventory Tweaks is now installed upon the next run of your server.
Method 2 - Maven
- Download and install Maven.
- Clone or download the project.
- Go to the location of the project, and open a terminal.
- Run
mvn clean package to manually compile the project.
- Cd into
/target/, and move the compiled .jar file into your server's /plugins/ folder.
- Keep Inventory Tweaks is now installed upon the next run of your server.
Permissions
keepinventory.update — Allows toggling KeepInventory for other players.
- OPs automatically have all permissions.
Configuration & Storage
- Player settings are stored in JSON files in the plugin directory.
- The plugin keeps all data persistent and works with offline players.
World-global behavior ensures consistency across all worlds on your server.
Contributing
Pull requests and issues are welcome! Please ensure code follows the same structure and JSON storage conventions.
License
Keep Inventory Tweaks is licensed under the MIT License with required attribution.
You may use or modify this plugin for personal or server use, but you must credit jiuhaywi as the original author.
View the license here
评论 0
登录后参与评分
还没有评论,来抢沙发吧