Death in Minecraft is close to inevitable. There are deadly mobs, lava pools, and high mountains ready to take you down and make you respawn. Nowadays, players even have to worry about the new mob boss Warden in Minecraft. Fortunately, you can respawn and go back to the place of your death to collect your dropped items without losing progress. But that solution isn’t vital for most cases. Your dropped items can despawn or even get stolen by other players. Moreover, dying in lava immediately destroys everything you drop, further raising the stakes of the Nether dimension (which you can easily visit using a Nether portal). Fortunately, there is a way to keep your inventory in Minecraft, and it requires almost no effort. All you need to do is tweak the game rules a little, and you are good to go. It enables you to stop the search and not worry about getting your items stolen. With that said, let’s learn how to keep inventory in Minecraft using commands in 2022.

We will first cover the basics before moving on to the process of using the keep inventory command in Minecraft. But if you don’t plan on waiting, use the table below to directly skip to the process to enable cheats and use the command.

  • What Happens When You Die in MinecraftEnable Cheats or Commands in Minecraft

  • On Bedrock EditionOn Java EditionHow to Enter Commands in Minecraft (PC, Console, or Mobile)How to Use Minecraft Keep Inventory Command

  • On Bedrock EditionOn Java Edition

What Happens When You Die in Minecraft

If you are in the creative, survival, or adventure mode of Minecraft, death isn’t permanent. You can respawn and choose to visit the location of your death to collect all the items from your inventory. However, in the hardcore mode, once you die you have to start over from the beginning in your world.

Now, the problem arises when it takes you too long to visit the place of your death. The game removes all the dropped items after 5 minutes of a chunk being loaded. So, if you take more than 5 minutes to reach your place of death, the items will automatically disappear. Moreover, you will have to make it back without all your resources unless you had a backup.

Commands work the same way as cheats work in other video games. To keep your inventory in Minecraft, you have to first enable cheats in your world. Here’s how to do the same on both editions.

On Bedrock Edition

Follow these steps to enable cheats in Minecraft Bedrock. The process remains the same for Windows, PS and Xbox consoles, Android, iOS, and iPadOS devices.

  1. Within the settings, make sure to navigate to the “Game” section from the left side panel. Then, look for the “Cheats” section in the right pane and turn on the “Activate Cheats” toggle.

On Java Edition

Follow these steps to enable cheats in your Minecraft Java world. These steps work on the following platforms – Windows, Linux, macOS, and Chrome OS with Minecraft Java edition.

  1. Next, turn on the “Allow Cheats” option within the LAN settings. Finally, click on “start LAN world” to go back to your world with cheats enabled.

How to Enter Commands in Minecraft (PC, Console, or Mobile)

To enter commands like “keep inventory” in Minecraft, you have to the in-game chat option. It works in the same way on all platforms of Minecraft. You can press the “T” key to open the chat option on a PC. Similarly, you can press the dedicated chat key on your consoles.

Meanwhile, if you are on Android, iOS, or iPad OS, you have to press the chat icon at the top of your screen. It looks like the highlighted icon in the screenshot above.

The “keep inventory” command in Minecraft is an extension of the game rule command. It allows you to change important rules by which a Minecraft world functions. Here’s how to use it.

/gamerule keepInventory true

Do keep in mind that Minecraft commands are case sensitive, so what you type should look like the command above. Then, press the “send” button or the enter key.

  1. Now that the keep inventory rule in Minecraft is active, you can test it. Put some resources in your inventory and kill your character. The best way to do so is by using the “/kill” command or jumping off a high place.

  2. When you respawn, you will notice that all the items in your inventory are intact. So, unless you choose to drop them, the items in your inventory are safe even if your character dies. It applies to your armor and even equipped items. Though, if you die with a blast or lava, your armor still takes damage as usual.

Just like that, you are now ready to take higher risks and die in Minecraft without losing your inventory. This nifty command opens up a variety of opportunities for you in-game. You can explore each of the Minecraft biomes without worrying about storage. You can even try to fight and meet the new mobs of Minecraft 1.19 with limited risks. But do keep in mind that this powerful command is useless in the best Minecraft servers. Most admins disable such commands to keep the game fair and stakes high for all the players on that server.