Minecraft Keep Inventory Command: Keep Items After Death
The Minecraft keep inventory command is /gamerule keepInventory true. Run it in a world where you have the necessary command permissions and players can keep their inventory when they die. Use /gamerule keepInventory false to return to normal item-dropping behavior. The game rule is called keepInventory in official Bedrock documentation, and its purpose is to preserve inventory after death rather than to stop the player from dying.
Keep inventory command: quick reference
| Command | Result |
|---|---|
/gamerule keepInventory true | Keep inventory on death |
/gamerule keepInventory false | Restore normal inventory-dropping behavior |
/gamerule keepInventory | Display current setting in versions that support querying a gamerule without a value |
How to enable keep inventory in Java Edition
- Open the world as the owner or join a server on which you have operator-level command privileges.
- Enable commands where necessary. In Java single-player worlds, the owner can use the world-management options that permit commands; server operators must grant suitable permissions.
- Open chat by pressing T or the chat key mapped in your controls.
- Enter
/gamerule keepInventory trueand send it. - Watch for command feedback. When uncertain, check the rule in a controlled world rather than intentionally sacrificing valuable equipment.
Do not confuse a local single-player setting with a network server setting. A player joining another person’s server cannot arbitrarily change the world’s gamerules without permission.
How to turn on keep inventory in Bedrock Edition
- From the world settings, locate the option to enable cheats or access command permissions.
- Understand the achievement impact: Microsoft’s Bedrock instructions warn that enabling cheats disables achievements for that world.
- Open chat with the device’s chat controls.
- Enter
/gamerule keepInventory trueand confirm that the game accepts it. - Reopen world settings if your particular Bedrock interface also offers a dedicated keep-inventory option.
What the command does and does not do
With keep inventory enabled, death still happens, the player still respawns in the appropriate place, and the game does not become Creative mode. The command changes what happens to items after death. It does not automatically restore items lost before the setting was enabled, rewind a prior death, or protect against world corruption and accidental file deletion.
Why the command might not work
| Symptom | Likely reason | Next step |
|---|---|---|
| Command blocked | No command permission | Ask world owner or server operator |
| Unknown command | Typo, syntax variation or commands unavailable | Type /gamerule and consult the game’s autocomplete |
| Items already lost | Rule enabled after death | Restore a backup or recover dropped items if still possible |
| Changed only on your device | You’re in a different world or server | Verify the exact world and server hosting settings |
Should you use keep inventory in Survival?
Keep inventory can make a family world or a relaxed building project more approachable, especially when the focus is exploration rather than replacing gear. Players seeking harder survival can leave it off. On shared servers, publish the rule to members so everyone understands what will happen when they die. Some challenge communities explicitly prohibit changes to gamerules.
Keep inventory vs item recovery
Keep inventory works prospectively: it changes the rule for future deaths. For an item you lost before enabling it, look for your dropped items before they despawn or consult any backups you control. World-specific mods, plugins and admin rollback tools are different systems; no standard command can promise to recreate every lost item from nothing.
Frequently asked questions
Does keep inventory require cheats?
Using the command requires suitable permissions, and in Bedrock the official commands documentation identifies cheats as necessary.
Will turning it off delete my items?
No. Turning the rule off changes what happens on future deaths, not the items currently in your inventory.
Does it work for every player?
It is a world game rule rather than a per-player toggle in a standard vanilla world.
What if I want Creative mode instead?
That is a separate game mode. Read our Minecraft Creative mode guide for differences.
For related navigation information, see our Minecraft coordinates guide. Official reference: Microsoft Minecraft GameRule enumeration identifies keepInventory and its effect. Command examples are documentation-derived, not represented as live gameplay testing.
