What is the Keep Inventory Command in Minecraft?

Hold on to your things.

Image via Mojang

Console commands in Minecraft can be a handy tool to improve the experience. Players can use it to alter the game quickly without needing to weed through settings or find in-game means to do what they want. If you are not looking to lose your inventory on death, you can use the console command to always retain everything without dropping it when you die. Here is how to do the Keep Inventory command in Minecraft.

Related: How to set up the Minecraft Jenny mod

How to use the Keep Inventory command in Minecraft

To quickly change your game to allow you to keep your inventory on death in Minecraft, first, you need to bring up the chat option. On PC, press T. On console, press right on the d-pad. From there, input /gamerule keepInventorytrue on either the Java or Bedrock Edition of Minecraft and hit enter. You will get a message confirming the rule change.

If you ever want to revert the rule to having you drop items upon death, open the chat window and input /gamerule keepInventory false, and hit enter to get another confirmation about the rule reverting to its original form.

There are many console commands available in Minecraft besides the Keep Inventory one. From interacting with other players, teleporting, server, player and world interaction, and other useful tools, these cheats can change the game positively if you don’t care about playing the standard experience. If you are having trouble getting the console commands to work, go into your settings and make sure that the cheats are turned on; otherwise, these will not work. For most players, Keep Inventory is a nice thing to have in place to make the experience a little more friendly.