Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer
1  
So, if the server crashes for some reason and it restart again, the game rule persist. –  rokimoki Dec 6 '13 at 16:54
1  
Yes if the server crashes, the gamerule will still be there when it loads back up again. –  aman207 Dec 6 '13 at 16:59
    
Thanks, that's what I wanted to know before reboot or something that disturb users. =) –  rokimoki Dec 6 '13 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.

http://www.minecraftforum.net/topic/840677-nbtexplorer-nbt-editor-for-windows-and-mac/

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

enter image description here

share|improve this answer
    
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. –  rokimoki Dec 6 '13 at 17:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.