How to Keep Your Inventory After Death in Minecraft (Java & Bedrock)
When you lose valuable items after dying in Minecraft, it can be very annoying. Fortunately, whether you're playing Bedrock or Java edition of Minecraft, there are a few ways to guarantee that you keep your inventory items even after you die. In this guide, we'll show you how to customize Keep Inventory to retain only specific items for Bedrock and how to enable it to prevent losing everything you've worked so hard to achieve.
![]() |
| Minecraft player keeping inventory items after death using the /gamerule keepInventory true command on Java and Bedrock editions. |
It can be annoying to die in Minecraft and lose everything you've collected, especially after spending hours gathering resources. Thankfully, you can use in-game commands or game rules to keep your inventory after you die. To make sure your items remain in your inventory after you die in Minecraft Java Edition, just use the /gamerule keepInventory true command. The same command can be used via commands or in your world settings for Bedrock Edition. For survival, creative building, or testing new mods without losing valuable items, this straightforward tip is crucial. You won't ever have to worry about losing your equipment again if you can master this feature.
Using Keep Inventory in the Java Edition
If you're playing Minecraft Java Edition, the easiest way to avoid item loss after death is to enable the Keep Inventory game rule. To accomplish this, take these steps:
- To open your Minecraft world's chat window, press T.
- Type this command: /gamerule keepInventory true.
- Type Enter.
After you've completed this, you'll keep all of your inventory items even if you die. You die. This is ideal for long exploration trips, such as carrying valuable Netherite blocks, because you won't lose them if you fall into a hole or encounter a dangerous mob. However, if you are in a world where cheats are not enabled, there is a solution.
To enable cheating:
- Press Escape, then click Open to LAN, toggle Allow Cheats to ON, and begin the LAN world.
- Once you've done this, enter the above command to keep your inventory items after death.
The keepInventory gamerule is particularly useful because it allows you to keep all of your levels.
How to Keep Items After Death in Bedrock Edition?
Keep Inventory can be enabled in Minecraft Bedrock Edition in two ways: from the settings menu or with a command.
- Navigate to the Play menu and select your world.
- Click the Edit button (the pencil icon).
- Turn on the Activate Cheats option in the Game Settings.
- Scroll down to find the Keep Inventory option.
- Turn Keep Inventory On.
![]() |
| How to Keep Your Inventory After Death in Minecraft (Java & Bedrock) |
Unfortunately, when you use cheats, you lose access to achievements. Achievements are only available in worlds set to survival mode, with cheats disabled.
Just like in Java, if you have Keep Inventory enabled, you will keep everything you own in the event of your death. In survival environments where you frequently die and lose progress—like when excavating or exploring deep caverns—this can be extremely helpful.
Keeping your inventory after death in Minecraft is easy once you know the command. By enabling /gamerule keepInventory true, your items stay safe on both Java and Bedrock editions. This trick is perfect for survival mode, testing builds, or protecting rare items, making your gameplay less stressful and more enjoyable.



Comments