Keep Inventory On Death
Keep your items when you die instead of dropping them
✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026Stops you and all players from dropping inventory and experience on death. Items stay in your hotbar and inventory, eliminating the scramble to recover them. Run /gamerule keepInventory false to restore death penalties and re-enable the standard 5-minute despawn timer on dropped items.
/gamerule keepInventory true28 characters
- Java: yes
- Bedrock: yes
- Command block: yes
- Needs cheats / OP: yes
How to use
- Open chat (T on Java, / on Bedrock).
- Paste the command.
- Press Enter — the rule applies world-wide to all players immediately.
- Your death message appears but no items drop; respawn and find yourself with full inventory.
Related commands
Stop creepers, endermen, and other mobs from changing blocks
/gamerule mobGriefing falseRespawn immediately on death without clicking the button
/gamerule doImmediateRespawn true