I know if you type the command /gamerule keepInventory true as an Operator, when you die, the items will keep in your inventory. How can I do this in game server properties? For example, in the server.properties file in a survival mode server I own.

2 Answers 2


Game Rule data is stored as part of the underlying world data, rather than loading from the server.properties file. Therefore, the only way to change Game Rules is through running the /gamerule command while in-game. Fortunately, they do persist with the world, so you only need to run them once.

  • 1
    So, if the server crashes for some reason and it restart again, the game rule persist. Dec 6, 2013 at 16:54
  • 1
    Yes if the server crashes, the gamerule will still be there when it loads back up again.
    – aman207
    Dec 6, 2013 at 16:59
  • Thanks, that's what I wanted to know before reboot or something that disturb users. =) Dec 6, 2013 at 17:08

I want to answer the part about editing Game Rules from outside the Minecraft client. You can easily use something like NBTExplorer to edit the Game Rules (and other "world only data") from outside the minecraft client.


This can be useful when the server is closed but you still need to edit the world data.

enter image description here

  • Well, that's very interesting anyway, I am programming a php webpage to manage the server data and showing some stats of the server, I think that will help me to find out what's in the world, or what can be edited/displayed. Thanks. Dec 6, 2013 at 17:59

You must log in to answer this question.

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