Type /gamerule keepInventory true on a current Java server and the command fails. Minecraft gamerules were renamed in 1.21.11, and every Java rule now uses snake_case, like keep_inventory. This guide lists every current rule with its default value and its Bedrock name. It also shows the name each rule had before 1.21.11, so you can find the setting you want and type it right the first time. Some rules exist only on Java and a few only on Bedrock, and the tables mark which is which.
How to Change a Gamerule
Run /gamerule followed by the rule name and a value, for example /gamerule keep_inventory true. Leave the value off to read the current setting. Rules take either true or false, or a whole number, and the minecraft: prefix is optional.
For example: /gamerule elytra_movement_check false
Gamerules work like any other command, so a singleplayer world needs cheats turned on, and a server needs operator status. Our guide to enabling cheats in Minecraft covers the singleplayer side. If you want a wider tour of what you can type once commands are on, see the list of vanilla commands in Minecraft.
In Java 26.1 and later, you can also change rules without typing a command:
- Open the pause menu and select
World Options. - Select
Edit Game Rules. - Use the search bar to find the rule, then switch it on or off, or type a new number.
On an Apex server, open the Apex server panel, go to Server Management and then Console, and type the command without the slash. The change applies at once, so the server does not need a restart.
Note: Paper and Spigot store game rules separately for each world. A rule you set in the Overworld does not carry over to the Nether or the End. To change another dimension, run the command from that dimension, like this:
execute in minecraft:the_nether run gamerule mob_griefing false
Swap minecraft:the_nether for minecraft:the_end to change the End.
Most Searched Gamerules
Most people land here for one setting. Each rule below links to its row in the full list, so you can see the default and the name it had before 1.21.11.
- keep_inventory:
/gamerule keep_inventory truelets players keep their items and experience when they die. Our guide on how to keep your inventory on in Minecraft walks through it in detail. - advance_time: To make it always day, run
/time set dayonce, then/gamerule advance_time false. The clock stops where you left it, and the moon phases stop with it. - advance_weather: To turn off weather, run
/weather clear, then/gamerule advance_weather false. Rain and thunderstorms stop starting on their own. - mob_griefing:
/gamerule mob_griefing falsestops certain mobs from changing blocks and picking up items. The post on Minecraft mob griefing explains which mobs it affects. - spawn_phantoms:
/gamerule spawn_phantoms falsestops phantoms from spawning at night. To learn why they show up at all, read about Minecraft phantoms.
Full List of Minecraft Gamerules
The tables follow the categories on the Edit Game Rules screen, and each one is sorted by name. The Name Before 1.21.11 column shows the camelCase name Java used before the rename, which helps when you follow a command written for an earlier version. None means the rule is new. A Bedrock Name of No means the rule does not exist on Bedrock. The search box filters every table at once.
Chat
These rules control what the server writes to chat and to the log.
| Java Name | Name Before 1.21.11 | Bedrock Name | Default | What It Does |
|---|---|---|---|---|
| command_block_output | commandBlockOutput | commandblockoutput | true | Command blocks notify admins in chat when they run a command. |
| log_admin_commands | logAdminCommands | No | true | Writes admin commands to the server log. |
| send_command_feedback | sendCommandFeedback | sendcommandfeedback | true | Shows the result of a player’s command in chat. It also affects the command block output bar. |
| show_advancement_messages | announceAdvancements | No | true | Announces advancements in chat. |
| show_death_messages | showDeathMessages | showdeathmessages | true | Puts death messages in chat. It also covers pet death messages. |
Drops
These rules decide which blocks, mobs, and explosions leave items behind. The three decay rules apply to explosions: when one is true, some of the blocks an explosion destroys drop nothing.
| Java Name | Name Before 1.21.11 | Bedrock Name | Default | What It Does |
|---|---|---|---|---|
| block_drops | doTileDrops | dotiledrops | true | Blocks drop items when they are broken. |
| block_explosion_drop_decay | blockExplosionDropDecay | No | true | Some blocks destroyed by block explosions, such as a bed or respawn anchor blast, drop nothing. |
| entity_drops | doEntityDrops | doentitydrops | true | Entities that are not mobs, such as minecarts and boats, drop items. |
| mob_drops | doMobLoot | domobloot | true | Mobs drop items and experience orbs. |
| mob_explosion_drop_decay | mobExplosionDropDecay | No | true | Some blocks destroyed by mob explosions, such as a creeper blast, drop nothing. |
| projectiles_can_break_blocks | projectilesCanBreakBlocks | projectilescanbreakblocks | true | Projectiles can destroy blocks that break on impact. |
| tnt_explosion_drop_decay | tntExplosionDropDecay | tntexplosiondropdecay | false | Some blocks destroyed by TNT drop nothing. It is off by default, so TNT blasts drop every block. |
Miscellaneous
This group holds command limits and a few rules that fit nowhere else.
| Java Name | Name Before 1.21.11 | Bedrock Name | Default | What It Does |
|---|---|---|---|---|
| command_blocks_work | commandBlocksEnabled | commandblocksenabled | true | Command blocks run when powered. |
| global_sound_events | globalSoundEvents | No | true | Some events, such as a boss spawning, play their sound for every player instead of only nearby ones. |
| max_block_modifications | commandModificationBlockLimit | No | 32768 | The most blocks that /clone, /fill, and /fillbiome can change in one command. |
| max_command_forks | maxCommandForkCount | No | 65536 | The most forks (contexts) that commands can create in one tick. Applies to command blocks and functions. |
| max_command_sequence_length | maxCommandChainLength | maxcommandchainlength | 65536 | The longest chain of commands that can run during one tick. |
| max_minecart_speed | minecartMaxSpeed | No | 8 | The top speed of minecarts, from 1 to 1000. It works only with the Minecart Improvements experiment turned on. |
| reduced_debug_info | reducedDebugInfo | No | false | The debug screen (F3) shows reduced information. |
| tnt_explodes | tntExplodes | tntexplodes | true | TNT explodes after it is activated. |
Mobs
These rules change how mobs behave toward players and the world.
| Java Name | Name Before 1.21.11 | Bedrock Name | Default | What It Does |
|---|---|---|---|---|
| forgive_dead_players | forgiveDeadPlayers | No | true | Angered neutral mobs calm down when the player they target dies. |
| max_entity_cramming | maxEntityCramming | No | 24 | The most pushable entities allowed in one space before cramming damage starts. A value of 0 disables the rule. |
| mob_griefing | mobGriefing | mobgriefing | true | Certain mobs can change blocks and pick up items. |
| raids | disableRaids | No | true | Raids can happen. The value is inverted compared with disableRaids, so raids false turns raids off. |
| universal_anger | universalAnger | No | false | Angered neutral mobs attack any nearby player, not only the one that angered them. |
Player
This is the biggest group. It covers damage, respawning, sleeping, portals, and movement checks.
| Java Name | Name Before 1.21.11 | Bedrock Name | Default | What It Does |
|---|---|---|---|---|
| allow_entering_nether_using_portals | allowEnteringNetherUsingPortals | No | true | Players can enter the Nether through portals. |
| drowning_damage | drowningDamage | drowningdamage | true | Players take damage when they drown. |
| elytra_movement_check | disableElytraMovementCheck | No | true | The server checks the speed of players who wear an elytra. The value is inverted compared with disableElytraMovementCheck, so elytra_movement_check false skips the check. |
| ender_pearls_vanish_on_death | enderPearlsVanishOnDeath | No | true | Ender pearls a player threw disappear when that player dies. |
| fall_damage | fallDamage | falldamage | true | Players take fall damage. |
| fire_damage | fireDamage | firedamage | true | Players take damage in fire, lava, and campfires, and on magma blocks. |
| fire_spread_radius_around_player | None | No | 128 | Fire spreads only within this many blocks of a player. A value of 0 disables fire spread, and -1 removes the limit. |
| freeze_damage | freezeDamage | freezedamage | true | Players take damage while they stand in powder snow. |
| immediate_respawn | doImmediateRespawn | doimmediaterespawn | false | Players respawn at once, without the death screen. |
| keep_inventory | keepInventory | keepinventory | false | Players keep their items and experience after they die. |
| limited_crafting | doLimitedCrafting | dolimitedcrafting | false | Players can craft only the recipes already in their recipe book. |
| locator_bar | locatorBar | playerwaypoints | true (Java), everyone (Bedrock) | The locator bar shows where other players are. On Bedrock the value is everyone or off. |
| natural_health_regeneration | naturalRegeneration | naturalregeneration | true | Players regenerate health on their own while their hunger is high enough. |
| player_movement_check | disablePlayerMovementCheck | No | true | The server checks player movement speed. The value is inverted compared with disablePlayerMovementCheck, so player_movement_check false skips the check. |
| players_nether_portal_creative_delay | playersNetherPortalCreativeDelay | No | 0 | How many ticks a player in Creative mode waits inside a Nether portal before the teleport. |
| players_nether_portal_default_delay | playersNetherPortalDefaultDelay | No | 80 | How many ticks a player in other game modes waits inside a Nether portal before the teleport. |
| players_sleeping_percentage | playersSleepingPercentage | playerssleepingpercentage | 100 | The percentage of players that must sleep to skip the night. |
| pvp | pvp | pvp | true | Players can damage other players. |
| respawn_radius | spawnRadius | spawnradius | 10 | How many blocks out from world spawn a player can respawn. |
| spectators_generate_chunks | spectatorsGenerateChunks | No | true | Players in Spectator mode generate new chunks as they move. |
Spawning
These rules switch individual spawns on or off.
| Java Name | Name Before 1.21.11 | Bedrock Name | Default | What It Does |
|---|---|---|---|---|
| spawn_mobs | doMobSpawning | domobspawning | true | Mobs spawn naturally. Spawners and raids are not affected. |
| spawn_monsters | spawnMonsters | No | true | Monsters spawn naturally. |
| spawn_patrols | doPatrolSpawning | No | true | Pillager patrols can spawn. |
| spawn_phantoms | doInsomnia | doinsomnia | true | Phantoms can spawn at night. |
| spawn_wandering_traders | doTraderSpawning | No | true | Wandering traders can spawn. |
| spawn_wardens | doWardenSpawning | No | true | Wardens can spawn. |
| spawner_blocks_work | spawnerBlocksEnabled | No | true | Monster spawners and trial spawners work. |
World Updates
These rules control time, weather, and how blocks change over time.
| Java Name | Name Before 1.21.11 | Bedrock Name | Default | What It Does |
|---|---|---|---|---|
| advance_time | doDaylightCycle | dodaylightcycle | true | The day and night cycle and the moon phases move forward. |
| advance_weather | doWeatherCycle | doweathercycle | true | The weather changes on its own. |
| lava_source_conversion | lavaSourceConversion | No | false | Flowing lava next to two lava sources turns into a new source block. |
| max_snow_accumulation_height | snowAccumulationHeight | No | 1 | The most layers of snow that can pile up during snowfall. |
| random_tick_speed | randomTickSpeed | randomtickspeed | 3 (Java), 1 (Bedrock) | How often random block ticks happen, which drives crop growth and decay. A value of 0 disables random ticks. |
| spread_vines | doVinesSpread | No | true | Vines spread to nearby blocks. |
| water_source_conversion | waterSourceConversion | No | true | Flowing water next to two water sources turns into a new source block. |
Bedrock-Only Gamerules
These rules exist only on Bedrock. Java has no equivalent, and the names stay lowercase. Fire is the one to watch: on Java, fire_spread_radius_around_player controls how far fire spreads.
| Bedrock Name | Default | What It Does |
|---|---|---|
| dofiretick | true | Fire spreads and burns out on its own. |
| functioncommandlimit | 10000 | The most commands that /function can run at once. |
| respawnblocksexplode | true | Controls whether beds and respawn anchors explode when used in a dimension where they do not work. False stops the explosion. |
| showcoordinates | true | The player’s coordinates show on the HUD. |
| showtags | true | Hides the “Can place on” and “Can destroy” lists and the item lock indicators in item lore. |
Frequently Asked Questions
Why Does the keepInventory Gamerule Not Work?
Java renamed the rule to keep_inventory in 1.21.11, so the camelCase spelling fails. Run /gamerule keep_inventory true instead. On Bedrock the name is keepinventory. If the name is right and nothing happens, check that you have cheats on or operator status.
Do Gamerules Need Cheats?
On Java, yes. In a singleplayer world, cheats must be on. On a server, you need operator status, or you can run the command from the Console in the Apex server panel, which needs no operator status.
Are Gamerules the Same on Java and Bedrock?
Not quite. Bedrock names are all lowercase with no separators, many Java rules do not exist on Bedrock, and a few defaults differ: random_tick_speed is 3 on Java and 1 on Bedrock. Bedrock also has rules Java lacks, listed in the Bedrock-only table above.
How Do I Check a Gamerule’s Current Value?
Run the rule with no value, for example /gamerule mob_griefing, and the game reports the setting in chat. On Java 26.1 and later you can also open World Options and select Edit Game Rules to see every value at once.
Conclusion
Pick the rule in the tables, change one at a time, and read it back with the rule name alone before you move on. That habit catches the most common mistake, a name typed in the wrong style for your edition, before it costs you a world.



























