How to change a game rule
Run gamerule <rule> <value> in the console, or with a slash in game as an operator. Run it with no value to see the current setting. Rules apply immediately and are saved per world, so on Paper the Nether and End have their own copies.
From 1.21.11, including all 26.x versions, rule names are snake_case with an optional minecraft: prefix, for example keep_inventory. Older versions use camelCase names such as keepInventory. If you are unsure, type gamerule and press tab to list the names your version accepts.
The rules owners change most
Shown as the 1.21.11+ name, with the older name in brackets:
- keep_inventory (keepInventory): players keep items and XP on death
- mob_griefing (mobGriefing): creepers, endermen and ghasts can change blocks
- players_sleeping_percentage (playersSleepingPercentage): share of players who must sleep to skip the night
- pvp: players can hurt each other, a game rule since 1.21.9 (previously the pvp server property)
- spawn_phantoms (doInsomnia): phantoms spawn for players who have not slept
- show_advancement_messages (announceAdvancements): advancements announced in chat
- advance_time (doDaylightCycle) and advance_weather (doWeatherCycle)
- random_tick_speed (randomTickSpeed): crop growth and leaf decay speed; leave at 3 on survival servers
Fire spread changed shape
The old doFireTick on and off switch became fire_spread_radius_around_player, a number that controls how far from players fire can spread. Check the current value with gamerule fire_spread_radius_around_player before changing it, and test in a safe area.
Sensible defaults for an SMP
Most survival communities set players_sleeping_percentage to a low value so one or two sleepers skip the night. Keep inventory is a matter of taste; many SMPs leave it off but use a graves plugin instead, which keeps items safe without removing the stakes. mob_griefing off protects builds from creepers but also stops villagers farming and some mob farms, so think before switching it.