MinecraftSide
Guide

How Do You Turn On Keep Inventory in Minecraft?

Keep your items and XP after death in Java or Bedrock.

How Do You Turn On Keep Inventory in Minecraft?

What Keep Inventory Does

To keep your items after death, enable cheats and enter /gamerule keepInventory true in the chat. This game rule stops your items from dropping when you die. It also keeps your experience levels, so you can get back to exploring without first recovering your gear.

The setting works in both Java and Bedrock Edition. You can use it in a singleplayer world or a multiplayer world where you have permission to run commands. The steps to turn on cheats differ by edition.

It is a world setting, not a change to your inventory menu. Once enabled, it stays on until someone changes the rule or the world settings. Check the spelling and capitalization of the command if it does not work.

Why Players Use the Keep Inventory Rule

Death in Minecraft can mean losing tools, armor, food, and other items. Without this rule, dropped items may vanish after five minutes in a loaded area. They can also land in lava or somewhere hard to reach. Keeping inventory removes that recovery task.

This can make cave trips, long journeys, and new builds less risky. Players can try unfamiliar areas without carrying a backup set of every tool. It also helps younger players or casual groups focus on building and exploring.

The rule keeps experience levels, too. That matters if you have spent time gaining XP for enchanting or repairs. It does not stop death or prevent other setbacks, such as being sent back to your spawn point.

  • Keep carried items and worn armor after death
  • Retain experience levels
  • Spend less time retrieving dropped gear
  • Make exploration less punishing for a group

Keep inventory changes the survival challenge. A group can turn it on for a relaxed world, then switch it off later if everyone wants the usual risk.

Enable Keep Inventory in Java Edition

In Java Edition, cheats must be on before you can run the game rule. For a new world, open the world creation screen and set Allow Cheats to on. Create the world, then open chat and enter the command.

  1. Open the world, then press T to open chat.
  2. Type /gamerule keepInventory true.
  3. Press Enter to run the command.
  4. Check the chat message to confirm the rule changed.

For an existing singleplayer world, pause the game and choose Open to LAN. Turn on Allow Cheats, then start the LAN world. Open chat and run the same command. This grants command access for that session; repeat the LAN step after leaving and rejoining if needed.

On a multiplayer server, you need the right permission. Ask the server owner or an operator to run the command if you cannot. The rule affects the world, so it can apply to everyone who plays there.

That is how to set keep inventory in Minecraft Java. The command uses the same spelling in current Java versions, though older versions may show slightly different settings menus.

Block cave entrance with tools stored safely on a glowing stone shelf
Java world gear stays with you

Enable Keep Inventory in Bedrock Edition

In Bedrock Edition, turn on cheats in the world settings. You can do this when making a new world or by editing an existing one. Turning on cheats may disable achievements for that world, so consider this before changing a world where achievements matter.

  1. Open the world settings for the world you want to change.
  2. Find the Cheats section and switch on Activate Cheats.
  3. Enter the world and open chat.
  4. Type /gamerule keepInventory true, then send the command.

Menu labels and locations can vary a little by device or game update. Look in the world’s settings rather than the general game settings. If you are playing someone else’s world, the host must enable cheats or grant the needed access.

Bedrock supports the same game rule command as Java. The main difference is how you grant command access: Bedrock uses the world’s cheats setting, while Java has the world creation and Open to LAN options.

Isometric block world with a glowing chest beside a safe cave path
Set the rule in Bedrock settings

Turn Keep Inventory Off Again

To return to the usual death rules, run /gamerule keepInventory false. Use chat in the same world where you enabled the rule. You still need cheats or permission to run commands.

After the change, items and XP can drop when a player dies. The rule does not restore items from deaths that happened while it was off. If you are unsure which setting is active, ask the game to show the current value.

Enter /gamerule keepInventory in chat. The game should report whether the rule is true or false. This is a quick way to check before a risky trip.

Glowing chest mechanism on a floating block platform in a violet night scene
Switch the keep inventory rule off

Fix Common Command Problems

If the command fails, first check that you typed it exactly. The rule name uses a capital I in keepInventory. Leave a space between the rule name and true, and do not add punctuation at the end.

  • “Unknown command”: Check for a spelling error and confirm that commands are available in your version.
  • No permission: Enable cheats, start a Java LAN session with cheats, or ask a server operator for help.
  • Items still dropped: Confirm the command ran in the right world and check the rule’s current value.
  • Bedrock achievements concern: Review the warning before activating cheats on an achievement world.

In multiplayer, only the host or a player with suitable permission may be able to change game rules. A command that works in your own world may fail on a server. Ask the owner to check the rule if you do not have access.

Also check that you are testing the same world where you entered the command. A setting in one saved world does not change another. If you are using a hosted server, confirm that its world has loaded and that the command was accepted.

Quiet block cave path beside a closed chest and glowing crystal blocks
Check settings when commands fail

Choose the Setting That Fits Your World

Keep inventory is a simple way to avoid losing items and experience when you die. In Java, enable cheats during world creation or use Open to LAN for an existing singleplayer world. In Bedrock, activate cheats in that world’s settings.

Then run /gamerule keepInventory true in chat. Use false to turn it off. These steps cover both editions and work in multiplayer when the host or server grants command access.

For a relaxed building world, leaving the rule on can keep play moving. For a tougher survival run, leave it off or switch it back after a short test. Pick the rule that suits the people sharing the world.

Step-by-step

  1. 01
    Enable cheats or command access

    In Java, turn on cheats when making a world or open an existing world to LAN. In Bedrock, activate cheats in the world settings.

  2. 02
    Open chat

    Join the world where you want to change the rule. Open the chat or command entry field.

  3. 03
    Enter the game rule

    Type /gamerule keepInventory true and send the command. Check the chat response to confirm it worked.

  4. 04
    Check the active setting

    Enter /gamerule keepInventory to view the current value. Use false if you want items to drop after death again.

Frequently asked questions

What is the keep inventory command in Minecraft?
Enter /gamerule keepInventory true in chat. Cheats or command permissions must be enabled.
How do I set keep inventory in Minecraft Java?
Enable cheats when creating the world, or open an existing world to LAN with cheats on. Then run /gamerule keepInventory true.
How do I turn on keep inventory in Bedrock?
Open the world settings and activate cheats. Join the world and enter /gamerule keepInventory true in chat.
Does keep inventory save experience in Minecraft?
Yes. The rule keeps your experience levels when you die, along with your carried items and worn armor.
How do I turn keep inventory off?
Run /gamerule keepInventory false in the world. You need cheats or permission to use commands.
keep inventory commandminecraft game rulesminecraft cheats settingsjava world commandsbedrock world settings

Related reading