Home›Games›Minecraft›Minecraft Keep Inventory Command: How /gamerule keepInventory Works
Minecraft artwork
Game Guide

Minecraft Keep Inventory Command: How /gamerule keepInventory Works

Minecraft Bedrock guide explaining the keepInventory game rule, how to turn it on or off, what it changes after death and how to verify the setting using Microsoft's official command system.

PCPlayStationXboxNintendoSandbox

Minecraft Keep Inventory Command: How /gamerule keepInventory Works

Open controller inputs →

Minecraft Keep Inventory Command: How /gamerule keepInventory Works

Minecraft Bedrock Edition includes a game rule called keepInventory. Microsoft documents this rule as controlling whether players keep their inventory when they die.

Turn Keep Inventory On

Use:

/gamerule keepInventory true

This enables the rule for the world.

Turn Keep Inventory Off

Use:

/gamerule keepInventory false

This restores normal inventory-loss behavior.

What the Rule Changes

Microsoft's official Bedrock game-rule documentation states that keepInventory controls whether players keep their inventory on death.

When enabled, the rule prevents the normal inventory-drop behavior associated with dying.

It Is a World Rule

The setting applies at the world level rather than being a one-time command for a single death.

Do Not Confuse It With a Temporary Buff

Once set, the rule remains in the world's current game-rule state until it is changed again.

Check the Current Rule

The /gamerule command can also be used to inspect game-rule values.

If you are unsure whether Keep Inventory is active, check the rule before testing it by dying.

Command Syntax

The rule uses a Boolean value:

  • true — enable Keep Inventory.
  • false — disable Keep Inventory.

Capitalization

Use the rule name exactly as Minecraft expects it:

keepInventory

Permissions

Command access depends on the world and the player's permission level.

If the command does not work, verify that your account has sufficient command privileges.

Cheats and Game Rules

Microsoft's current Bedrock command reference lists the /gamerule command and its permission requirements separately from individual rule behavior.

Do not assume every command has identical cheat requirements.

World Settings

Microsoft's Bedrock world-settings documentation also lists Keep Inventory as an available game rule.

This confirms that it is part of the world's persistent rules rather than a third-party modification.

Good Uses for Keep Inventory

The rule can be useful for:

  • Learning unfamiliar areas.
  • Testing builds or command systems.
  • Reducing item-loss pressure in casual worlds.
  • Custom multiplayer rules.

Do Not Assume Every Server Allows It

Multiplayer servers and hosted worlds may use their own rules and permission systems.

If you are not the world owner or operator, you may not be able to change the setting.

Keep Inventory and Difficulty

Keep Inventory is a separate game rule from difficulty.

Changing difficulty does not automatically enable or disable the rule.

Keep Inventory and Other Game Rules

Minecraft includes many other game rules controlling world behavior.

Examples documented by Microsoft include:

  • doDaylightCycle
  • doWeatherCycle
  • mobGriefing
  • fallDamage
  • fireDamage
  • naturalRegeneration

Change Only the Rule You Need

You do not need to modify unrelated game rules simply to keep your inventory after death.

Testing the Rule Safely

If you want to verify the setting:

  1. Use the command to set keepInventory to true.
  2. Check the game rule.
  3. Use low-value test items first if you are uncertain.

Do Not Test With Irreplaceable Items First

Confirm the rule before risking rare equipment in a world where command access may be restricted.

Turn It Back Off

If you later want normal survival behavior again, use:

/gamerule keepInventory false

Bedrock vs Java

This guide is based on Microsoft's Bedrock Edition documentation.

Java Edition uses the same familiar game-rule concept, but command behavior should still be checked against the edition you are playing.

Common Mistakes

  • Typing the rule name incorrectly.
  • Using a player name instead of the true/false rule value.
  • Trying to change the rule without sufficient permission.
  • Assuming difficulty controls Keep Inventory.
  • Testing the rule with valuable items before confirming it worked.

Bottom Line

To keep items after death in Minecraft Bedrock, set keepInventory to true through the /gamerule command. It is a persistent world rule, so it remains active until changed back to false.

GetCheatBeacon guides focus on legitimate gameplay information, verified codes, and practical tips. Game mechanics and promotions can change, so details may be updated over time.

More Minecraft guides