How to keep Inventory command on death in Minecraft?

keep inventory command
keep inventory command in Vanilla Minecraft

Ways to keep Inventory command on death in Minecraft?

There will be times when Minecraft is set up in a default mode. One of the most frustrating aspects of Minecraft is the possibility of losing your inventory if you die. Some players find the fear of death more fun than others. Let us find out in this article “How to keep Inventory command on death in Minecraft”?

Use /gamerule to keepinventory true.

It will allow you to keep your inventory even if you are gone.
You must enable cheats and have the proper permissions to perform them.

Assuming that you are creative and have cheats enabled

Enter the command /gamerule Keepinventory
(Enter command/gamemode survival//gamemode adventure). –> Gets you out Creative

And you’re done.

Assuming that you are in Survival:

  • Click pause and then click Open to LAN.
  • Next, change “Allow Cheats to” to “ON.”
  • Enter the command “/gamerule keepInventory.”
  • Save and exit.
  • If you close your map, items that you have saved to your inventory will remain there after you die.

Does the keep Inventory command work with Vanilla Minecraft without any mods?

To prevent items from being lost upon death, you can use the command “/gamerule keepInventory true” (case sensitive). This command works in Vanilla Minecraft without any mods, as long as cheats have been enabled. This command can be used on a server, provided you have operator status.

How to enter the Command

In Minecraft, the chat window is the best place to execute a command. The Minecraft version determines which game control is used to open the chat window.

  • To open Java Edition (PC/Mac), use the T key to bring the chat window.
  • To access Pocket Edition (PE), tap the chat button help command located at the top.
  • To play Xbox One, press the D-Pad (right) on the controller.
  • To play PS4, use the D-Pad (right) on the controller.
  • To switch to Nintendo Switch, press the right arrow button on the controller.
  • To open the chat window for Windows 10 Edition, press and hold the T key.
  • To open Education Edition, press T to open the chat window.This command will create the gamerule for keeping inventory after death.
See also  Spirit guardians 5e cleric damage when cast in dnd spells


Start with ‘/gamerule KeepInventory true’
Enter the command in the chat window. The command will appear in the lower right corner of your chat window as you type. To execute the command, press the Enter key.
Your world will see a change in the game rule. Let’s now see what happens when you die in this game. You still have your items in your Hotbar. These items were not placed in front of your body when you died. To return to the game, click on the Respawn button.
Our items are still available in your Hotbar, as well as in other inventory rows. To reacquire your items, you don’t need to go to the place where you died last.

Congratulations! You just learned how the keep inventory command works to save inventory items when you die in Minecraft.