By default, dying in Minecraft causes you to drop all your items and experience points on the ground, where they can despawn or burn in lava. If you want a more forgiving gameplay experience or want to protect your hard-earned gear, you can enable the keep inventory feature using world settings or commands. This guide covers how to keep your inventory on death in both Java and Bedrock editions.
keepInventory does not disable achievements in Java Edition, but in Bedrock Edition, turning on cheats (which is required to change game rules via command) will permanently disable achievements for that specific world.Check Your Permissions or Cheats
To change the game rule that controls item dropping, you must have cheat permissions enabled in your world. If you are playing on a single-player world with cheats turned off, you will need to temporarily open your world to LAN and enable cheats.
If you are playing on a multiplayer server, make sure you are logged in as a server operator with the required permission level before attempting to run configuration commands.
Open the Chat Window
Press the correct key to open your in-game chat interface. By default, this is the T key on Java Edition, or by tapping the chat bubble icon at the top of the screen on Bedrock Edition mobile devices and consoles. If you need help opening chat, check out the guide on How to Open and Use Chat.
Type the Keep Inventory Command
Type the exact command to enable the keep inventory rule for your world. The syntax is identical for both Java and Bedrock editions. Type /gamerule keepInventory true into the chat box and press Enter or tap the send button.
If entered correctly, the game will display a confirmation message in the chat stating that the game rule has been updated successfully.
Alternative Method for Bedrock Edition World Settings
If you are playing Minecraft Bedrock Edition, you do not even need to use commands if you prefer a graphical menu. You can toggle this setting right before loading your world or by pausing the game.
Go to your World Settings, scroll down to the Cheats section, make sure Cheats are enabled, and locate the toggle labeled Keep Inventory. Switch this toggle to the on position.
Test Your New Setting
To ensure everything is working correctly, you can test the feature safely. Make sure you do not have any precious items in your hotbar just in case, or store your valuables in a chest first.
You can use commands like How to Change Game Mode with a Command to switch to survival, or simply find a safe way to trigger a death. When you respawn, you should notice that all your items remain securely in your inventory.
Frequently Asked Questions
Does keeping inventory disable achievements in Java Edition?
No. In Java Edition, changing game rules like keepInventory via commands does not disable advancements or achievements.
Can I use keep inventory on a Realm?
Yes. As long as you have operator status or administrative rights on your Realm, you can type the /gamerule keepInventory true command into chat just like a normal world.










