Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Creators
Details
Selective Keep Inventory
Selective Keep Inventory is a lightweight vanilla datapack for Minecraft Java Edition that enables keep inventory for specific players only.
Instead of enabling keepInventory for the entire world, this pack lets you choose exactly which players keep their items and XP after death.
Features
- Per-player keep inventory
- Per-player XP retention
- Fully server-side
- Vanilla datapack, no plugin or mod required
- Supports Minecraft Java Edition 1.20.2 to 1.21.11
How it works
Players with the keepinv tag keep their inventory and XP on death.
Players without the tag die normally and lose their inventory/XP as expected.
Commands
Enable for a player:
/tag <player> add keepinv
Disable for a player:
/tag <player> remove keepinv
Example:
/tag Steve add keepinv
Fabric:
Player Keep Inventory
Server-side Fabric mod for Minecraft 1.21.1 that enables keep-inventory only for selected players.
Command
/keepinventory <player|selector> <on|off|toggle|status>
Examples:
/keepinventory Steve on/keepinventory @a[team=vip] on/keepinventory Steve status
Installation
- Put the ZIP file into your world's
datapacksfolder - Run
/reload - Check with
/datapack list
Notes
This is a vanilla datapack, so it does not add a custom root command like /keepinv on Steve.
Use the player tag system shown above.


