How to use game rules (keepInventory and more)
Game rules are simple on and off switches that change how your world behaves, like keeping your items when you die.
The command
gamerule RuleName value
The ones people use most
gamerule keepInventory truekeeps your items and XP when you die.gamerule mobGriefing falsestops creepers and endermen changing the world.gamerule doDaylightCycle falselocks the time of day.gamerule doWeatherCycle falselocks the weather.gamerule doFireTick falsestops fire spreading.gamerule doInsomnia falsestops phantoms spawning.gamerule showDeathMessages falsehides death messages in chat.gamerule randomTickSpeed 3controls how fast crops grow (higher is faster).
Type a rule with no value to see its current setting, for example gamerule keepInventory.
Game rules are saved with the world, so they stick around after a restart. Most take true or false, a few take a number.
Was this helpful?
Still need help? Contact support.