Keep Inventory Command: How to Stop Losing Items on Death
Java Edition 1.21.11 renamed the keep inventory command, but the feature works across both editions to let players retain their gear after dying.
Minecraft News
Dying in Minecraft survival mode normally means losing everything. Your items scatter across the ground in a circle from where you fell, then vanish after five minutes of loaded time—meaning the countdown only starts once you or another player loads those chunks again. The keep inventory gamerule stops that entirely, letting you respawn with your equipment, armour, and experience points intact.
According to Apex Minecraft Hosting, the feature does more than preserve items. It also protects your enchanting levels, since experience points stay with you on death. Some players deliberately use it to reset their hunger bar by dying and respawning fresh, making it useful for both casual survival and server administration.
The command itself is straightforward, but the exact syntax depends on your version. DoomHosting notes that Java Edition 1.21.11, released in December 2025, renamed all gamerules from camelCase to a new minecraft:rule_name format. On that version and newer, type /gamerule minecraft:keep_inventory true. Older Java builds use /gamerule keepInventory true—note the capital I, which Bedrock and older editions do not require.
Bedrock Edition (covering Xbox, PlayStation, Nintendo Switch, mobile, and Windows Bedrock) uses lowercase: /gamerule keepinventory true. The Spike points out that Bedrock players can also toggle keep inventory directly in the Game Settings menu without opening chat, though servers still need the command.
Enabling Cheats First
Both editions require cheats or operator permissions before you can run gamerule commands. On Java singleplayer, open your pause menu and select Open to LAN, then enable cheats from that screen. This grants temporary command access for your current session; the setting persists after you close and reopen the world. For a permanent solution without reopening to LAN each time, Apex Minecraft Hosting suggests using NBTEditor to modify your world's level data directly.
On Bedrock singleplayer, the toggle appears directly in Game Settings alongside other world rules. For servers, you need operator status: run op [username] from the server console, then enter the command in-game. Bedrock servers also require Allow Cheats set to Enabled in the server settings before restarting.

Server-Specific Gotchas
Paper and Spigot servers—the most common third-party software—handle gamerules differently than vanilla Minecraft. DoomHosting explains that these platforms treat the Overworld, Nether, and The End as separate worlds, each with its own copy of every gamerule. Running /gamerule once only affects your current dimension, which is why players often enable keep inventory in the Overworld and then lose everything on their first Nether trip. To fix this across all three, run /execute in minecraft:overworld run gamerule minecraft:keep_inventory true, then repeat the command for minecraft:the_nether and minecraft:the_end. On older versions, keep the old rule name (keepInventory) in those commands.
If changes do not stick after running the command, Apex Minecraft Hosting recommends running /save-all on Java to force the world to write the change, or restarting the server on Bedrock. You can verify the rule is active by typing /gamerule keepInventory with no value, which returns the current setting.
What Players Are Saying
The community response to keep inventory is broadly positive, especially among newer players and those tackling dangerous content like deep mining or lava exploration. Many creators highlight it as a quality-of-life feature that removes frustration without trivialising the game entirely. However, some veteran players argue that the constant threat of loss is core to survival mode's tension, and using keep inventory changes the intended experience. Server administrators appreciate the flexibility to toggle it per-world, letting different groups play by different rules. The main frustration players express is the naming confusion between Java and Bedrock, and the recent rename in Java 1.21.11 catching people off guard when old commands stop working.
To turn keep inventory off again, simply swap true for false in any of these commands. The setting applies only to the world or server where you entered it—enabling it in one save does not affect your other worlds or Realm slots.















