This article was co-authored by wikiHow staff writer, Glenn Carreau. Glenn Carreau is a wikiHow Staff Writer, currently based in Los Angeles. With over four years of experience writing for several online publications, she has covered topics ranging from world history to the entertainment industry. Glenn graduated with honors from Columbia College Chicago, earning a B.A. in Interactive Arts and Media and a minor in Professional Writing. Today, Glenn continues to feed her lifelong love of learning while serving wikiHow's many readers.
			
			This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.
			
			 This article has been viewed 45,494 times.
			
			Learn more...
		
Dying in Minecraft can be a common and frustrating occurrence for any player, whether they’re a seasoned veteran player or a total newbie. That’s because you run the risk of losing all your items when you die—and even though you have some time to get them back, it’s possible to lose them forever. That’s why the Keep Inventory command is such a useful feature; enabling it can give you a safety net to ensure you don’t lose all your items. In this guide, we’ll show you how to turn on the “Keep Inventory” function for Minecraft’s Java and Bedrock editions!
Steps
Enabling Keep Inventory in Java Edition (Existing World)
- 
1Make sure cheats are enabled in your Minecraft world. If you have an existing world, you can test if cheats are on or off by typing any command into the chat window and pressing “Enter.” The command will not work in a world with cheats off. If you need to enable cheats, do the following:- Open the Pause menu (by pressing the ESC key).
- Click on the Open to LAN button.
- Toggle the Allow Cheats option to ON.
- Finalize your choice by clicking Start LAN World.
- Note: You’ll have to repeat this process any time you re-enter the world after exiting. Exiting will stop that world from being hosted on LAN, and thus disable cheats again.
 
- 
2Open the chat window in your game. Once you’re running your current game world and have verified that cheats are enabled, press the T key. This will open the chat box for you! The chat box is where you can enter cheat codes.[1]- Remember, don't open a server unless you are the owner, a moderator, or have OP (operator) permissions; otherwise, it won’t work.
 Advertisement
- 
3Enter the Keep Inventory command into the chat. In the chat window, type /gamerule keepInventory true. The “I” in inventory must be capitalized for this to work! Then, press ↵ Enter. If done correctly, you should see a message in chat that says "Gamerule keepInventory is now set to: true."[2]- Now, even if you die, you’ll be able to keep all of the items you’ve collected so far!
- If you want to disable the Keep Inventory function later, use the command: /gamerule keepInventory false.
 
Enabling Keep Inventory in Java Edition (New World)
- 
1Boot up Minecraft and start a new world. If you’re making a brand new Minecraft world for Java’s single-player mode, it’s actually really easy to enable the “Keep Inventory” command while setting up your world! Start by opening your Minecraft game and clicking the Create New World button in the main menu. You’ll see this button right under the world list.- Need a name for your new world? Use our Minecraft world name generator!
 
- 
2Click on the Game Rules button. You’ll find Game Rules under the Allow Cheats button in your world creation menu. You’ll also need cheats enabled for this to work, so make sure to allow them as well![3]- To enable cheats, just click on the Allow Cheats button until it says Allow Cheats: On. This will allow you to change your game rules while in the new world.
 
- 
3Find the “Keep inventory after death” option on the menu. Scroll down until you see the Keep inventory after death option and click on the button next to it until it says true. That means you’ve enabled the command to let you keep your items when you die in Minecraft.[4]
- 
4Click the Create New World button. After adjusting the settings as much as you need, select the Create New World button to finalize your choices and officially create your new world. Once you enter this new world and start playing, you’ll be able to keep your items after death—with no need to enter a code into the chat window!- You can also use the /gamerule keepInventory true command later, so long as cheats are enabled or you have permissions on the server.
- If you ever want to disable the Keep Inventory function, use the command: /gamerule keepInventory false.
 
Enabling Keep Inventory in Minecraft Bedrock
- 
1Open your world’s Game Settings menu. Launch Bedrock and find the world you’re going to play in. Then, select the Edit button (which looks like a pencil icon, to the right of your world’s name). A new screen will open; select the Game button on the left side of the screen to access the Game Settings menu.[5]- This is where you can change the settings to enable keeping items when you die in Minecraft!
 
- 
2Activate cheats in your Game Settings menu. Scroll down the Game Settings menu until you find the Cheats section. Then, simply enable the option labeled Activate Cheats (so the switch turns green). [6]- Achievements will be deactivated while cheats are enabled for Bedrock.
 
- 
3Toggle the “Keep Inventory” setting to ON in the Settings menu. In the same Game Settings menu, look further down below the Activate Cheats option; under the same Cheats category, you’ll see another option called Keep Inventory. Switch the Keep Inventory option on (so it turns green), and you should be all set.[7]
- 
4Return to the game with your new settings enabled. Once you have Keep Inventory enabled, just back out of the Settings menu and return to your game. With that done, you’ll hold onto all your items in Minecraft—even if your character dies. It’s that easy to change your settings in Minecraft Bedrock! However, the /gamerule keepInventory true command will work here, too, if needed.[8]- If you’re the owner of a multiplayer server, you can enable this option for all players on that server as well.
 
Expert Q&A
Video
Tips
References
- ↑ https://www.digminecraft.com/game_commands/keep_inventory.php
- ↑ https://youtu.be/aSDyOk7EdxE?t=27
- ↑ https://minecraft.wiki/w/Tutorial:Menu_screen/Java_Edition
- ↑ https://minecraft.wiki/w/Tutorial:Menu_screen/Java_Edition
- ↑ https://minecraft.wiki/w/Tutorial:Menu_screen/Bedrock_Edition
- ↑ https://minecraft.wiki/w/Tutorial:Menu_screen/Bedrock_Edition
- ↑ https://minecraft.wiki/w/Tutorial:Menu_screen/Bedrock_Edition
- ↑ https://youtu.be/SABJ59HcWXU?t=31








































































