KeepInvPlus
一款高度可配置的 Paper 服务器死亡惩罚插件,在 keepInventory 游戏规则的基础上增加了有意义的后果——而不会剥夺一切。
概述
原版 keepInventory 功能是非此即彼的。KeepInvPlus 允许服务器管理员定义涉及三个属性的细致死亡惩罚:经验等级、饥饿值和物品——所有设置均可通过命令实时配置,无需重启服务器。
每个属性都共享相同的强大双层逻辑:
第一层 — 条件: 所有活跃条件必须满足,才会应用默认结果。
第二层 — 例外: 如果任何条件未满足,则按添加顺序检查例外情况。最后匹配的例外生效。如果没有例外匹配,则施加惩罚。
如果所有条件均满足,则完全跳过例外检查。
特性
⚔️ 经验惩罚
支持叠加多个惩罚,按添加顺序依次应用:
SUBTRACT(扣除)— 损失指定数量的等级(负数值给予等级)
HALVE(减半)— 等级减半
REMOVE_ALL(清除全部)— 失去所有等级
PERCENTAGE(百分比)— 损失当前等级的指定百分比
- 负百分比可在死亡时给予等级
- 超过 100% 的值可使等级变为负数
- 可选的
zero_cap(零上限)防止等级低于 0
? 饥饿系统
与惩罚死亡不同,KeepInvPlus 奖励良好表现。玩家重生时将恢复死前的饥饿值,除非他们满足了所有配置的补充条件:
TIME_ALIVE(存活时间)— 必须存活至少指定的秒数
BAR_CONSUMED(消耗饱食度条)— 死亡前必须至少消耗过一条饥饿值
? 物品惩罚
GAMBLE(赌博/概率丢失)— 每个非装备物品有概率在死亡时丢失
LOSE_NON_GEAR(丢失非装备物品)— 丢失除工具和护甲外的所有物品
? 例外(经验、饥饿与物品)
所有三个属性都支持共享的例外系统,作为条件未满足时的后备方案:
经验 & 物品例外(APPLY / SKIP):
PVP_DEATH(玩家击杀)— 当被其他玩家杀死时触发
SUICIDE(自杀)— 当玩家自杀时触发
饥饿例外(REPLENISH / DENY):
PVP_DEATH(玩家击杀)— 被其他玩家杀死可强制完全恢复饥饿值
SUICIDE(自杀)— 自杀行为可强制拒绝恢复饥饿值,无论其他结果如何
例外按添加顺序进行评估——最后匹配的例外生效,赋予服务器管理员对边缘情况的精细控制。
示例配置
硬核经济服务器: 死亡扣除 10 级,若被玩家杀死则跳过惩罚。
/kip set xp enabled true
/kip set xp type add SUBTRACT
/kip set xp subtract_amount 10
/kip set xp exception add PVP_DEATH SKIP
PvP 活动服务器: 死亡时给予等级以激励战斗。
/kip set xp enabled true
/kip set xp type add SUBTRACT
/kip set xp subtract_amount -5
生存服务器: 仅在存活足够久且进食良好的情况下恢复饥饿值。
/kip set hunger enabled true
/kip set hunger condition add TIME_ALIVE
/kip set hunger condition add BAR_CONSUMED
/kip set hunger min_seconds_alive 120
/kip set hunger exception add PVP_DEATH REPLENISH
/kip set hunger exception add SUICIDE DENY
命令
/kip set xp enabled <true|false>
/kip set xp type add <SUBTRACT|HALVE|REMOVE_ALL|PERCENTAGE>
/kip set xp type remove <SUBTRACT|HALVE|REMOVE_ALL|PERCENTAGE>
/kip set xp subtract_amount <number>
/kip set xp percentage <number>
/kip set xp zero_cap <true|false>
/kip set xp exception add <PVP_DEATH|SUICIDE> <APPLY|SKIP>
/kip set xp exception remove <PVP_DEATH|SUICIDE>
/kip set hunger enabled <true|false>
/kip set hunger condition add <TIME_ALIVE|BAR_CONSUMED>
/kip set hunger condition remove <TIME_ALIVE|BAR_CONSUMED>
/kip set hunger min_seconds_alive <seconds>
/kip set hunger exception add <PVP_DEATH|SUICIDE> <REPLENISH|DENY>
/kip set hunger exception remove <PVP_DEATH|SUICIDE>
/kip set items enabled <true|false>
/kip set items type <NONE|GAMBLE|LOSE_NON_GEAR>
/kip set items gamble_chance <0.0-1.0>
/kip set items exception add <PVP_DEATH|SUICIDE> <APPLY|SKIP>
/kip set items exception remove <PVP_DEATH|SUICIDE>
/kip get <xp|hunger|items|all>
/kip reload
权限
| 权限 |
描述 |
默认值 |
keepinvplus.admin |
访问所有 /kip 命令 |
OP |
要求
- Paper 1.21+
- Java 21+
- 必须启用
keepInventory 游戏规则(/gamerule keepInventory true)
补充说明
- 插件已在 Paper 服务器 1.21.11 上测试
- 可能与 Spigot/Bukkit/其他平台兼容,但请自行承担风险尝试
- 玩得开心 :)
KeepInvPlus
A highly configurable death penalty plugin for Paper servers that adds meaningful
consequences on top of the keepInventory gamerule — without taking everything away.
Overview
Vanilla keepInventory is all-or-nothing. KeepInvPlus lets server admins define
nuanced death penalties across three attributes: XP levels, hunger, and items —
all configurable live via commands with no server restart required.
Every attribute shares the same powerful two-tier logic:
Tier 1 — Conditions: All active conditions must pass for the default outcome to apply.
Tier 2 — Exceptions: If any condition fails, exceptions are checked in the order they
were added. The last matching exception wins. If no exception matches, the penalty applies.
If all conditions pass, exceptions are skipped entirely.
Features
⚔️ XP Penalties
Stack multiple penalties applied in the order they were added:
SUBTRACT — lose a configurable number of levels (negative values grant levels)
HALVE — levels cut in half
REMOVE_ALL — lose all levels
PERCENTAGE — lose a configurable percentage of current levels
- Negative percentage grants levels on death
- Values over 100% can push levels into the negative
- Optional
zero_cap prevents levels from going below 0
? Hunger System
Rather than punishing death, KeepInvPlus rewards good play. Players respawn with
their pre-death hunger unless they meet all configured replenishment conditions:
TIME_ALIVE — must have survived a minimum number of seconds
BAR_CONSUMED — must have consumed at least one hunger bar before dying
? Item Penalties
GAMBLE — each non-gear item has a configurable chance of being lost on death
LOSE_NON_GEAR — lose all items except tools and armor
? Exceptions (XP, Hunger & Items)
All three attributes support a shared exception system as a fallback when conditions fail:
XP & Items exceptions (APPLY / SKIP):
PVP_DEATH — trigger when killed by another player
SUICIDE — trigger when the player kills themselves
Hunger exceptions (REPLENISH / DENY):
PVP_DEATH — being killed by another player can force full replenishment
SUICIDE — self-kills can force hunger denial regardless of other results
Exceptions are evaluated in the order they were added — last matching exception wins,
giving server admins fine-grained control over edge cases.
Example Configurations
Hardcore economy server: Subtract 10 levels on death, skip penalty if killed by a player.
/kip set xp enabled true
/kip set xp type add SUBTRACT
/kip set xp subtract_amount 10
/kip set xp exception add PVP_DEATH SKIP
PvP event server: Grant levels on death to incentivise fighting.
/kip set xp enabled true
/kip set xp type add SUBTRACT
/kip set xp subtract_amount -5
Survival server: Replenish hunger only if you survived long enough and ate well.
/kip set hunger enabled true
/kip set hunger condition add TIME_ALIVE
/kip set hunger condition add BAR_CONSUMED
/kip set hunger min_seconds_alive 120
/kip set hunger exception add PVP_DEATH REPLENISH
/kip set hunger exception add SUICIDE DENY
Commands
/kip set xp enabled <true|false>
/kip set xp type add <SUBTRACT|HALVE|REMOVE_ALL|PERCENTAGE>
/kip set xp type remove <SUBTRACT|HALVE|REMOVE_ALL|PERCENTAGE>
/kip set xp subtract_amount <number>
/kip set xp percentage <number>
/kip set xp zero_cap <true|false>
/kip set xp exception add <PVP_DEATH|SUICIDE> <APPLY|SKIP>
/kip set xp exception remove <PVP_DEATH|SUICIDE>
/kip set hunger enabled <true|false>
/kip set hunger condition add <TIME_ALIVE|BAR_CONSUMED>
/kip set hunger condition remove <TIME_ALIVE|BAR_CONSUMED>
/kip set hunger min_seconds_alive <seconds>
/kip set hunger exception add <PVP_DEATH|SUICIDE> <REPLENISH|DENY>
/kip set hunger exception remove <PVP_DEATH|SUICIDE>
/kip set items enabled <true|false>
/kip set items type <NONE|GAMBLE|LOSE_NON_GEAR>
/kip set items gamble_chance <0.0-1.0>
/kip set items exception add <PVP_DEATH|SUICIDE> <APPLY|SKIP>
/kip set items exception remove <PVP_DEATH|SUICIDE>
/kip get <xp|hunger|items|all>
/kip reload
Permissions
| Permission |
Description |
Default |
keepinvplus.admin |
Access to all /kip commands |
OP |
Requirements
- Paper 1.21+
- Java 21+
keepInventory gamerule must be enabled (/gamerule keepInventory true)
Additional remarks
- Plugin tested on Paper server 1.21.11
- COULD be compatible with Spigot/Bukkit/Other platforms mentioned but try at your own risk
- Have fun :)
评论 0
登录后参与评分
还没有评论,来抢沙发吧