Why does /gamerule KeepInventory true not work? [duplicate]
I am in minecraft 1.8.9, and when I try to do /gamerule KeepInventory true, it says the command has been updated, and then I go and do /kill. But I still lose my items, both in creative and in survival. What am I doing wrong?
@Arperum mentioned in the comments that it should be keepInventory, but on some worlds, when I type /gamerule and cycle through the rules, the one with the uppercase "K" shows up. Is that a glitch?
Best Answer
The gamerule to keep your inventory is keepInventory, with a lower case "k"
/gamerule keepInventory true
You can look up the available gamerules on the wiki or in this question (which is basically copying the wiki).
The "glitch" you are observing isn't one. Since 1.8, the game allows you to add any arbitrary gamerule. Normally, these don't do anything, but you can add actual functionality via command blocks. What you are observing on some worlds is most likely that you already set KeepInventory to true, making it a valid gamerule in that particular world, hence it shows up for auto-complete.
Pictures about "Why does /gamerule KeepInventory true not work? [duplicate]"
![Why does /gamerule KeepInventory true not work? [duplicate] - Back view of anonymous male in sweater sitting at table with notepad and earbuds while browsing computer Why does /gamerule KeepInventory true not work? [duplicate] - Back view of anonymous male in sweater sitting at table with notepad and earbuds while browsing computer](/assets/images/why_does_gamerule_keepinventory_true_not_work_duplicate_1.jpeg)
![Why does /gamerule KeepInventory true not work? [duplicate] - Concentrated young black male with dreadlocks in formal wear having video conversation on laptop using TWS earphones while sitting in outdoor cafe Why does /gamerule KeepInventory true not work? [duplicate] - Concentrated young black male with dreadlocks in formal wear having video conversation on laptop using TWS earphones while sitting in outdoor cafe](/assets/images/why_does_gamerule_keepinventory_true_not_work_duplicate_2.jpeg)
![Why does /gamerule KeepInventory true not work? [duplicate] - Content young ethnic female entrepreneur having video call on city street Why does /gamerule KeepInventory true not work? [duplicate] - Content young ethnic female entrepreneur having video call on city street](/assets/images/why_does_gamerule_keepinventory_true_not_work_duplicate_3.jpeg)
Does Gamerule keepInventory true?
The command for activating the Keep Inventory cheat is /gamerule keepInventory true . You must enter this command into the chat window to activate the cheat that lets you keep your inventory when you die.How do you fix keepInventory in Minecraft?
Type \u201c/gamerule keepInventory true\u201d in the chatbox. Press \u201cEnter.\u201d After you die, you'll still have all your tools. Click on \u201cRespawn\u201d to restart the game.How do you set Gamerule keepInventory in Minecraft?
How to Enter the CommandWhy does keep inventory not work in the Nether?
There's too many duplicates for this; googling finds 5+ results. This may not be the solution, but gamerules don't apply across dimensions, so setting keepInventory to true in the overworld doesn't automatically apply to the nether or the end../gamerule KeepInventory true
More answers regarding why does /gamerule KeepInventory true not work? [duplicate]
Answer 2
First, ensure that you are OP on the server or you have cheats enabled on Singleplayer. Type /give @p minecraft:command_block. Go onto Creative by typing /gamemode 1 in chat and then right click on the ground to place the command block. Open it up, and type gamerule keepInventory true make sure the capitals are exactly the same (e.g. not keepinventory or KeepInventory) and press Done. Power it via a means of redstone. In chat you should see something like: [@: Gamerule keepInventory set to true.]
Answer 3
Didn't work for me so tried gamerule keepInventory false then tried gamerule keepInventory true and it worked then.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ketut Subiyanto, Cup of Couple, Ketut Subiyanto, Ono Kosuki
