Home › Minecraft › How to Keep Inventory When You Die in Minecraft
How to Keep Inventory When You Die in Minecraft
Every Minecraft player knows the sequence: a creeper you never heard, a long fall, a lava lake, then the death screen, and then the desperate sprint back to where you fell, racing a five-minute timer before everything you own despawns. If that ritual is not the game you want to play, there is a built-in rule that switches it off entirely. Here is how keep inventory works and how to turn it on.
What Normally Happens When You Die
By default, death scatters your whole inventory on the ground as dropped items. You respawn, usually at your bed or world spawn, and have to travel back empty-handed to recover it. The catch is the timer: dropped items despawn after five minutes in loaded chunks. Take too long, die again on the way, or fall in lava (which destroys the drops instantly), and the gear is gone for good. Hardcore mode is stricter still, since death ends the world itself. Keep inventory removes the item-loss part of the equation.
The Command
The whole feature is one gamerule, typed into chat:
/gamerule keepInventory true
Commands are case-sensitive, so the capital I in keepInventory matters. Press T (or the chat button on console and mobile), type the command exactly, and send it. From that moment, when you die you respawn with everything intact: inventory, hotbar, armor and equipped items. Your gear can still take damage from the blast or lava that killed you, but none of it drops. To turn the rule back off later, run the same command with false instead of true.
First, Enable Cheats
Gamerules only respond in worlds where cheats or commands are allowed.
On Bedrock Edition
- Open the pause menu and go into Settings.
- Open the Game section and find the Cheats area.
- Switch on Activate Cheats. Note that on Bedrock this turns off achievements for that world.
On Java Edition
If you did not allow cheats when creating the world, you can still enable them temporarily per session:
- Press Esc and choose Open to LAN.
- Set Allow Cheats to ON.
- Click Start LAN World. Cheats now work until you quit and reload the world.
Test It Once
Put something unimportant in your inventory, run the command, then take a deliberate dive off a cliff (or use /kill). You should respawn holding everything. Testing with junk first means any typo in the command costs you nothing.
Honest Limitations
Keep inventory only works where you control the rules. On public multiplayer servers, the rule belongs to the server, and most survival servers leave it off on purpose, since death stakes keep their economies honest. It also does nothing in hardcore mode. But for a relaxed solo world, a building project, or playing with younger kids, it is the single best quality-of-life switch Minecraft has.
If You Would Rather Not Use Cheats
There is a vanilla middle path. A recovery compass, crafted from a compass surrounded by eight echo shards from ancient city chests, points toward the place you last died as long as you are in the same dimension. It does not save your items by itself, but paired with a fast horse or an elytra, it turns the five-minute despawn race into a trip you can actually win.
Frequently asked questions
What is the keep inventory command in Minecraft?
It is /gamerule keepInventory true, typed into chat with cheats enabled. Run it with false at the end to turn the rule off again.
Do I keep my armor with keep inventory on?
Yes. Everything in your inventory, hotbar, armor slots and equipped items stays with you when you respawn, though the gear can still take damage from whatever killed you.
How long do dropped items last after death?
Five minutes in loaded chunks, which is why the default death run is so stressful. Items that fall in lava are destroyed instantly instead.
Does keep inventory work on servers?
Only if the server has the gamerule set. Most public survival servers leave it off, so it mainly benefits singleplayer worlds and private servers you control.
Redstone Components in Minecraft: A Complete Guide
Respiration Enchantment in Minecraft: Breathe Longer Underwater
What Does Smite Do in Minecraft? Smite Enchantment Guide
What Do Horses Eat in Minecraft? Every Food and Its Effects
All Wolf Variants in Minecraft and Where to Find Them