Home » How to Keep Inventory in Minecraft Java and Bedrock

How to Keep Inventory in Minecraft Java and Bedrock

by PrinceofGeek
Voxel-style blocks illustrating Minecraft keep inventory settings

Turning on Keep Inventory stops Minecraft from dropping your items when you die. The rule also preserves your experience, while health, hunger, and status effects still reset normally. It is useful for younger players, exploration-heavy worlds, classrooms, and servers that want less punishing deaths.

The command is different in current Java and Bedrock editions. Copy the version that matches your game.

Keep Inventory command for Minecraft Java Edition

Open chat and enter:

/gamerule keep_inventory true

Java command names are case-sensitive, and the current rule uses an underscore. To confirm the value later, enter the command without true:

/gamerule keep_inventory

In a new single-player world, enable commands during world creation. In an existing Java world where commands are off, open the pause menu, choose Open to LAN, enable commands, and start the LAN world. That permission lasts for the current session. On a server or Realm, the owner must grant you operator-level permission.

Keep Inventory command for Minecraft Bedrock Edition

On Bedrock for Windows, Xbox, PlayStation, Switch, and mobile, use:

/gamerule keepinventory true

Bedrock shows the rule in lowercase and does not use an underscore. Microsoft’s official gamerule reference lists keepinventory as the setting that controls whether players retain inventory after death.

You can also open the world’s settings and turn on Keep Inventory under the Cheats section. If you use the command, open chat with the controller or keyboard shortcut and enter it exactly as shown.

Will Keep Inventory disable achievements?

In Bedrock Edition, enabling cheats disables achievements for that world, and the game warns you before applying the change. Treat that as permanent for the affected world. If achievements matter, make a copy first and experiment on the duplicate.

Java Edition handles advancements differently. Enabling commands does not globally switch off Java advancements, although using commands can obviously change how you complete a challenge.

The official Minecraft commands guide explains the permission difference between Java and Bedrock and how to enable commands. Keep Inventory is a game rule, so it applies to the whole world rather than only to the player who typed it.

How to turn Keep Inventory off again

Use the same command with false:

Java Edition

/gamerule keep_inventory false

Bedrock Edition

/gamerule keepinventory false

After it is disabled, a normal death drops the player’s carried items and experience again. Changing the rule does not remove items already kept from an earlier death.

Why does the command say you do not have permission?

  • Single-player Java: commands are not enabled for the current session.
  • Bedrock: the world has not allowed cheats, or your player permission is too low.
  • Realm: only the owner or an authorized operator can change game rules.
  • Dedicated server: run the command from the server console or ask an operator.

If you are setting up a shared world, our Minecraft Realms vs. server comparison explains the control and setup differences. You may also want the separate guide to show coordinates in Java and Bedrock for easier navigation.

Does it work for every player?

Yes. Keep Inventory is a world-level game rule, so once it is enabled, every player keeps items and experience after death in that world. You do not need to repeat the command for each player or each login.

For a family or friends-only world, decide on the rule together. It removes the frustration of recovering gear from lava or a distant cave, but it also reduces the risk attached to exploration. The best setting is the one that keeps your group enjoying the world.

You may also like

Leave a Comment