partialkeepinv
Keeps shulker boxes, container items (ender chests, bundles) and all non-stackable gear (tools, weapons, armour, elytra, etc.) on death while everything else drops normally. Adds configurable 1–5 level XP loss and light armour durability damage on each dea
partialkeepinv
partialkeepinv
Partial Keep Inventory introduces a softer alternative to `/gamerule keepInventory` for Paper 1.21.x servers (tested on 1.21.11). Instead of keeping *everything* or dropping *everything*, it selectively protects valuable items while still punishing deaths.
Core features
- drop normally - Keeps all drop normally (any colour). - Keeps all drop normally – tools, weapons, armour, elytra, etc. (anything with max stack size 1). - Keeps extra drop normally such as drop normally and drop normally (and anything else you add to the whitelist in `config.yml`). - All other items (blocks, food, stackables) drop normally on death.
- original inventory slots - Kept items are restored to their original inventory slots (hotbar and main inventory). - Off-hand item is restored to the off-hand slot when possible. - If a slot is already occupied (because of other plugins or edge cases), the item is added to the inventory and dropped at the player’s feet if there’s no space.
- kept and re-equipped - Armour is kept and re-equipped automatically on respawn. - Each death applies extra durability damage to each worn armour piece (default ~3% of max durability, configurable). - Items won’t be instantly destroyed by the death penalty (at least 1 durability is preserved).
- 1–5 - On every death the player loses a configurable number of XP levels (default 1–5, never below level 0). - No XP orbs are dropped; the plugin directly sets the new level on respawn.
Configuration
- `keep.shulkers`, `keep.non_stackable_items`, `keep.containers` – toggle what types of items are protected. - `containers.material_whitelist` – list extra container-like materials to always keep (default: `ENDER_CHEST`, `BUNDLE`). - `xp_loss.enabled`, `xp_loss.min_levels`, `xp_loss.max_levels` – control how many levels are lost on death. - `armor_damage.enabled`, `armor_damage.percent` – control whether and how much armour durability is lost per death.
Requirements
- Server: 21+ (should work on other 1.21.x builds). - Java: 21+ - Make sure in each relevant world: ```mcfunction /gamerule keepInventory false