I'm a newbie to Minecraft, and not a computer whiz, so I fully expect I'm going something wrong here.

I've been trying to use the keepInventory cheat in Minecraft but it always says "Unknown Command" and no options come up when I put in /gamerules (all that comes up is /gamemode). I've been having a streak of getting killed with some awesome stuff in my inventory and I desperately want to keep this from happening again!

I have cheats enabled. Is there something I'm missing? How so I solve this?

  • press tab twice when typeing: /game <tab x2> . If it switches to /gamerule its not an issue of the game only your knowledge :)
    – Reflexive
    Mar 26, 2017 at 23:08
  • Ok, to clarify, each space in the command is not a space but 2 tabs? So /gamerule tab x 2 keepInventory tab x2 true
    – Vee Fraser
    Mar 27, 2017 at 20:38
  • No what I meant by <tab> is the shortcut for commands. So say you have: /game < That is when you click tab without a space (The tab button) it should come up with: /gamemode And then if you click tab again: it should be /gamerule and then to finish: /gamerule keepInventory true
    – Reflexive
    Mar 27, 2017 at 23:58
  • Ok, gotcha. /gamerule does not come up as a possible command, only /gamemode
    – Vee Fraser
    Mar 29, 2017 at 15:35
  • What version of minecraft are you runnong
    – Reflexive
    Mar 30, 2017 at 9:51

2 Answers 2


From here:


Sets or queries a game rule value.



gamerule <rule name> [value]

Pocket Edition

gamerule <rule: string> <value: bool>
gamerule <rule: string> <value: int>
gamerule [rule: string]

Additionally, issuing /gamerule by itself will list available game rules.

The particular gamerule you are seeking is called keepInventory.

Issue the following command:

/gamerule keepInventory true

You seem to use /gamerules instead of the correct one /gamerule. It is without the s on the end.

Not the answer you're looking for? Browse other questions tagged .