PDF download Download Article
Play Minecraft (Java or Bedrock) without fear of losing your items
PDF download Download Article

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!

A Quick Guide to Keeping Your Inventory in Minecraft

  • Java (Existing World): Open the chat window in your Minecraft game and enter the code /gamerule keepInventory true.
  • Java (New World): Select Create New World in the main menu. Set “Allow Cheats” to On and switch Keep inventory after death to true.
  • Bedrock: Find your game world and select the Edit icon. Navigate to Game Settings and toggle both Activate Cheats and Keep Inventory on (green).
Section 1 of 4:

Enabling Keep Inventory in Java Edition (Existing World)

PDF download Download Article
  1. 1
    Make 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.
  2. 2
    Advertisement
  3. 3
    Enter 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.
  4. Advertisement
Section 2 of 4:

Enabling Keep Inventory in Java Edition (New World)

PDF download Download Article
  1. 1
    Boot 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.
  2. 2
    Click 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.
  3. 3
    Find 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]
  4. 4
    Click 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.
  5. Advertisement
Section 3 of 4:

Enabling Keep Inventory in Minecraft Bedrock

PDF download Download Article
  1. 1
    Open 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!
  2. 2
    Activate 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.
  3. 3
    Toggle 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]
  4. 4
    Return 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.
  5. Advertisement
Section 4 of 4:

Benefits of Using the Keep Inventory Command in Minecraft

PDF download Download Article
  1. The “Keep Inventory” command prevents accidental loss of progress. Say you’re running around in Minecraft and accidentally fall off a cliff, or get surprise-attacked by a creeper. If you aren’t careful, you could lose hours’ worth of building, resource gathering, and creation progress. That’s no fun! With the Keep Inventory setting enabled, you can play without worrying that your creative projects will get majorly disrupted.
    • Players looking for a challenge (and a more immersive survival experience) might not want to use the Keep Inventory feature—but it’s really to each their own!

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Change Your Gamemode in MinecraftChange Your Gamemode in Minecraft
Stop Minecraft from Pausing when Tabbing Out Prevent Minecraft's Auto-Pausing When You Use Alt-Tab
Die in MinecraftDie in Minecraft
Hack MinecraftHack Minecraft
Get Command Blocks in MinecraftGet Command Blocks in Minecraft
Play Minecraft in Creative ModePlay Minecraft in Creative Mode
Use Command Blocks in Minecraft Use Commands in Minecraft to Spawn Blocks, Objects, & More
Stop Rain in MinecraftStop Rain in Minecraft
Create an Unturned ServerCreate an Unturned Server
Play Minecraft Offline Play Minecraft Without an Internet Connection
Make a Minecraft Server on a MacMake a Minecraft Server on a Mac
Make a Minecraft Server for FreeA User-Friendly Guide to Create a Free Minecraft Server
Play Minecraft MultiplayerPlay Minecraft Multiplayer
Enable Education Edition in Minecraft Enable Education Edition in Minecraft (Bedrock Edition)
Advertisement

About This Article

Glenn Carreau
Co-authored by:
wikiHow Staff Writer
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 viewed 45,494 times.
How helpful is this?
Co-authors: 20
Updated: October 10, 2025
Views: 45,494
Thanks to all authors for creating a page that has been read 45,494 times.

Did this article help you?

Advertisement