Tell me more ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I once played a vanilla Minecraft adventure map (called "Herobrine's Mansion") that prevented the player from losing their items on death. Which commands can be used to prevent the player from losing their items on death (in vanilla Minecraft)?

share|improve this question

2 Answers

up vote 10 down vote accepted

You can use the command /gamerule keepInventory true to prevent the player from losing items on death. This command will work in Vanilla Minecraft, without using any mods (as long as cheats are enabled).

share|improve this answer
6  
only if cheats are enabled – ratchet freak Nov 26 '12 at 19:11

Use /gamerule keepinventory true. This'll make you keep your inventory when you die.

As mentioned before, you need to have cheats enabled, and you need to have the permissions to execute them.

Assuming you're in creative and have cheats enabled:

  • Enter the command /gamerule keepinventory
  • (Enter command /gamemode survival or /gamemode adventure) --> Takes you out of Creative

And you're done.

Assuming you're in Survival:

  • Hit pause, and click open to LAN.
  • On the next screen, set "Allow Cheats" to "ON."
  • Enter the command /gamerule keepInventory
  • Save and Exit.
    When you re-open your map, items will stay in your inventory after you die.
share|improve this answer

protected by Oak Feb 23 at 17:20

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

Not the answer you're looking for? Browse other questions tagged or ask your own question.