Minecraft Gamerules on a Server: Renamed Rules, Defaults and Commands
If you typed gamerule keepInventory true and got an error, nothing is wrong with your server. Minecraft 1.21.11 renamed every gamerule. The old camelCase names are gone, and each rule now has a snake_case name such as keep_inventory or advance_time.
Most of the rules behave the way they always did. A few were flipped, merged or dropped, and those are the ones that bite people, so they get their own section below. Names and the rename come from Mojang's 1.21.11 release notes (December 9, 2025) and the 25w44a snapshot notes. The defaults come from the community wiki's rule list, which still uses the old names. Java Edition has since moved to 26.x version numbers, and the site's server.properties guide covers that side of things.
- Every gamerule was renamed to snake_case in Minecraft 1.21.11.
keepInventoryis nowkeep_inventory. doDaylightCyclebecameadvance_time, and three "disable" rules were inverted.- Run
gamerulewith no value to read a rule, and use Tab completion to confirm names.
On this page
Running a gamerule on your server
The syntax is the same as before: the rule name, then an optional value. Leave the value off and the game tells you what the rule is set to right now. Booleans take true or false, and the number rules take a whole number.
gamerule keep_inventory
gamerule keep_inventory true
gamerule players_sleeping_percentage 50In the panel, open the Console tab, type the command without the slash and press Send. In game you'll need to be an operator, and you do use the slash there. Type /gamerule and press Tab to see every rule your version knows about. That list is the final word on spelling, so use it whenever a name from a guide doesn't work.
Rules belong to the world, not the server. Mojang's own wording for the Create World screen button is that it lets you view and edit "the game rules of the world", so a fresh world starts from the defaults even if you changed a lot on the old one.
Old name to new name
Mojang's 25w44a notes list these renames explicitly. The notes show them with a minecraft: prefix, so if a command complains, try the name with and without it, and let Tab completion show you what your version prefers.
| Old name (1.21.10 and earlier) | New name (1.21.11 and later) |
|---|---|
doDaylightCycle | advance_time |
doWeatherCycle | advance_weather |
doMobSpawning | spawn_mobs |
doInsomnia | spawn_phantoms |
doPatrolSpawning | spawn_patrols |
doTraderSpawning | spawn_wandering_traders |
doWardenSpawning | spawn_wardens |
doImmediateRespawn | immediate_respawn |
doMobLoot | mob_drops |
doEntityDrops | entity_drops |
doTileDrops | block_drops |
announceAdvancements | show_advancement_messages |
naturalRegeneration | natural_health_regeneration |
spawnRadius | respawn_radius |
maxCommandChainLength | max_command_sequence_length |
snowAccumulationHeight | max_snow_accumulation_height |
Everything not in that list got the plain conversion, camelCase to snake_case. keepInventory became keep_inventory, mobGriefing became mob_griefing, randomTickSpeed became random_tick_speed, and so on. Mojang's notes describe that pattern but only print the renames that went beyond it, so check any rare rule with Tab before you put it in a script.
The rules that were flipped or removed
Three rules that used to start with "disable" now use the positive form, and the value is inverted to match:
disableRaidsis nowraids. To stop raids you now rungamerule raids false.disableElytraMovementCheckis nowelytra_movement_check.disablePlayerMovementCheckis nowplayer_movement_check.
If you copy an old command that says true to turn something off, flipping only the name and not the value will do the opposite of what you wanted. That's the mistake to watch for.
Fire spread got merged. doFireTick and allowFireTicksAwayFromPlayer are both gone, replaced by one number rule, fire_spread_radius_around_player. Set it to 0 to stop fire spreading. Set it to -1 to let fire spread even when no player is nearby. Mojang's notes don't give the default, so run the command with no value to see what your world uses.
Some number rules also picked up minimums. Mojang lists random_tick_speed, players_sleeping_percentage, respawn_radius and max_entity_cramming among them, and max_snow_accumulation_height now runs from 0 to 8.
Defaults worth knowing
These defaults are from the community wiki's rule list, which was written under the old names. Mojang described the 1.21.11 change as a rename, so we're listing them under the new names. If something looks off in your world, trust the value the game reports.
| Rule | Default | What it does |
|---|---|---|
keep_inventory | false | Players keep items and experience after dying. |
mob_griefing | true | Mobs can change blocks and pick up items. |
players_sleeping_percentage | 100 | Share of Overworld players who must sleep to skip the night. |
random_tick_speed | 3 | Random block ticks per chunk section per tick. Zero or less turns them off. |
respawn_radius | 10 | How far from world spawn players first spawn or respawn. |
spawn_phantoms | true | Phantoms can spawn at night. |
natural_health_regeneration | true | Players heal on their own when their hunger bar allows it. |
max_entity_cramming | 24 | How many pushable entities can crowd one spot before damage starts. |
players_nether_portal_default_delay | 80 | Ticks a Survival player waits inside a Nether portal. |
max_block_modifications | 32768 | Most blocks a single /fill or /clone can change. |
Four server.properties lines are now gamerules
Mojang's 25w35a snapshot removed pvp, allow-nether, spawn-monsters and enable-command-block from server.properties and turned them into game rules. Changing those lines in the file no longer does what it used to, so use the rule instead. The easiest one to remember is PvP:
gamerule pvp falseThe Nether, monster and command block rules were renamed again by the later snake_case change, so we won't guess at their final spelling here. Type gamerule and press Tab in game, or scan the list, and pick them out. Our operators and whitelist guide covers the other settings people look for in that file.
When a gamerule command fails
- Check the server version first. A server still on 1.21.10 or older uses the old names, and a server on 1.21.11 or newer uses the new ones.
- "Unknown or incomplete command" usually means the name is wrong, either an old name or a typo. Use Tab completion instead of typing from memory.
- Anything that runs gamerule commands on its own, such as command blocks or function files in a data pack, has to be updated to the new names too. Look through them after you move to 1.21.11 or newer.
- A rule that exists in the list but seems to do nothing might be getting overridden by a plugin or data pack. Test on a clean world before blaming the rule.
Frequently asked questions
What is the new name for doDaylightCycle?
It's <code>advance_time</code>. Mojang's 1.21.11 notes use that exact rename as their example. Weather is <code>advance_weather</code>.
Why does gamerule keepInventory not work anymore?
Because 1.21.11 renamed all gamerules to snake_case. Use <code>gamerule keep_inventory true</code> instead.
How do I see every gamerule on my server?
Type <code>/gamerule </code> in game and press Tab. In the panel's Console tab, type <code>gamerule </code> and the same list is what you're working from. The Edit Game Rules screen on world creation shows them too.
Do I have to be an operator to change gamerules?
In game, yes. From the panel's Console tab you don't, because the console runs commands as the server.
Did the disable rules change meaning?
Three of them did. <code>disableRaids</code> became <code>raids</code>, and the elytra and player movement checks were renamed the same way. Their values are inverted, so <code>false</code> now means off.