How Do You Keep Your Inventory After Death in Minecraft?
Keep your items after death with one gamerule or a world setting.
What Keep Inventory Does in Minecraft
To save your inventory in Minecraft after death, turn on the Keep Inventory gamerule. Use /gamerule keepInventory true in a world where you can run commands. Your items and equipped gear will stay with you when you respawn.
With the rule off, death usually makes you drop your carried items. Those drops can vanish after a short time, or fall somewhere hard to reach. Keep Inventory removes that risk, which can make survival play less punishing.
The rule does not stop death or prevent all setbacks. You may still lose experience, depending on your game version and settings. It also does not protect items stored in chests or other containers. The rule applies to the player’s carried inventory.
It is a world setting, not a separate game mode. You can use it in a survival world, creative world, or many multiplayer worlds. Check your version and permissions before changing it.
How to Turn on Keep Inventory
The command is the same in many current Java and Bedrock versions: /gamerule keepInventory true. Capitalization can matter in older versions, so enter the rule name as shown if the game rejects it. You also need cheats or command access.
Open chat, type the command, then press Enter or the send button. On a console or mobile device, open the chat or command bar first. If the game reports that the rule changed, test it in a safe spot.
- Make sure cheats are enabled, or ask a server admin for permission.
- Open the chat and enter /gamerule keepInventory true.
- Confirm the game accepts the command.
- Test the rule only if you are willing to risk a death in that world.
There is no need to run the command after every death. The rule remains active for that world until someone changes it. If you join a different world, its gamerule may be different.

Set It Up in Java Edition
When you make a new Java world, open the world options and allow cheats. Start the world, then run the gamerule command in chat. In some versions, you can also enable commands through the world setup options before play begins.
For an existing world, cheats must be allowed. If they were not enabled when you created the world, open the pause menu and choose the option to open the world to LAN. Turn on cheats for that session, then start the LAN world and enter the command.
This LAN method grants command access only for the current session. You may need to repeat it after you close and reopen the world. Make a backup before changing settings on a valuable save.
Java Edition does not disable achievements when you use this gamerule. Still, enabling cheats in an existing world can affect other play choices. Use the setting that fits your preferred challenge.
Set It Up in Bedrock Edition
In Bedrock Edition, you can change the setting in the world menu. From the world list, select the edit control beside your world. Open Game Settings, find the Cheats section, and switch on “Keep Inventory.” The exact menu layout can differ by device or game release.
You can also use the command if cheats are enabled. Open chat and enter /gamerule keepInventory true. If you play on a Realm or server, your role must allow commands, or an owner must change the setting.
Take care before turning on cheats in a Bedrock world. Enabling cheats disables achievements for that world. Turning cheats off later does not restore them for that save.
If achievements matter to you, consider making a copy of the world first. You can test the setting in the copy, then decide whether to use it in your main world. This keeps your original save and its achievement status separate.

Java and Bedrock Differences
The gamerule serves the same main purpose in both editions: it keeps carried items after death. The way you reach it differs. Java players often use commands or world setup options, while Bedrock offers a direct Game Settings toggle.
The biggest practical difference is achievements. Java does not turn them off because you enabled Keep Inventory. Bedrock disables achievements when cheats are enabled, and the setting counts as a cheat.
Older releases may handle commands and menus in a different way. Some use a different spelling or capitalization for the gamerule. If the current command fails, check the command help or settings for your exact edition and version.
| Edition | Common way to enable it | Achievement effect |
|---|---|---|
| Java | Allow cheats, then run the gamerule command | Does not disable achievements |
| Bedrock | Use Game Settings or run the command | Cheats disable achievements |
Both editions can have extra limits on a hosted game. A server owner or Realm owner may control which players can run commands. In that case, a local setting may not be available to you.
How to Turn Keep Inventory Off
To return to the usual death rules, enter /gamerule keepInventory false. You need the same command access used to turn it on. After the game accepts the command, new deaths will drop carried items again.
Turning the rule off does not bring back items lost before the change. It only affects what happens after the rule is disabled. Check the message in chat to confirm the game accepted your command.
In Bedrock, you can also turn off the setting in the same Game Settings menu. Keep in mind that changing cheats or the gamerule does not restore achievements already disabled for that world.

Fix Common Keep Inventory Problems
If the command is unknown, check the spelling first. Use keepInventory as one word, with a capital I. Older versions may use different capitalization, so try the spelling shown by that version’s command help.
If the game says you lack permission, cheats may be off or your account may not have operator access. In single-player, enable cheats or use the LAN option in Java. On a server, ask an admin to grant access or run the command for you.
- Command does not work: Confirm you are in the right world and edition.
- Permission denied: Enable cheats or ask the owner for command access.
- Items still drop: Check that the game confirmed the rule change.
- Bedrock achievements are off: This is expected after enabling cheats.
- Rule resets: Check whether a server plugin or world setting changes it.
Some servers use plugins or custom rules that override the normal gamerule. If the command succeeds but items still drop, ask the server staff about their death settings. A server may also reset rules when it restarts.
Finally, make sure you changed the rule in the world where you died. The setting does not carry between separate saves. A quick check with the command can confirm its current state on versions that support it.
Step-by-step
- 01 Check cheats and permissions
Make sure cheats are enabled in your world. On a server, ask an admin for command access.
- 02 Open chat or Game Settings
In Java, open chat after allowing cheats. In Bedrock, open the world’s Game Settings and find the Cheats section.
- 03 Enable Keep Inventory
Run /gamerule keepInventory true, or switch on Keep Inventory in Bedrock settings. Confirm the game accepts the change.
- 04 Check the result
Review the setting or command response in the same world. Remember that Bedrock cheats disable achievements.
Frequently asked questions
- How do I keep my inventory after dying in Minecraft?
- Run /gamerule keepInventory true in a world where you can use commands. You can also turn on the setting in Bedrock Game Settings.
- Does Keep Inventory work in Minecraft Java Edition?
- Yes. Enable cheats or command access, then run the gamerule command. Using it does not disable Java achievements.
- Does Keep Inventory disable achievements in Bedrock?
- Yes. Enabling cheats in Bedrock disables achievements for that world. Turning cheats off later does not restore them.
- Why does the Keep Inventory command not work?
- Check the spelling, edition, and version. You may also lack permission, or cheats may be disabled.
- How do I turn Keep Inventory off?
- Run /gamerule keepInventory false, or switch off the setting in Bedrock Game Settings. The change affects future deaths.
Related reading
What Does a Lectern Do in Minecraft?
Lecterns display books, shape villager jobs, and add redstone control.
How Do You Add a Server on Xbox Minecraft?
See which Xbox server options work and how to join friends or community worlds.
How Do You Export a Minecraft World?
Copy or export your world, then bring it back when you need it.