
Command reference
Game Rules
Game rules switch parts of the game on or off or set a number. Minecraft Java Edition has 58 of them, changed with /gamerule, plus 1 that only exists with an experiment switched on.
| Change a rule | /gamerule <rule> <value> |
| See a rule's value | /gamerule <rule> |
| In the menu | The same rules are set under Game Rules when a world is created |
| advance_time | Advance time of day | true or false | true | The time of day moves on. Off, the sun and moon stay where they are. |
| advance_weather | Update weather | true or false | true | The weather changes by itself. Off, the current weather stays. |
| allow_entering_nether_using_portals | Allow Nether | true or false | true | Controls whether players are allowed to enter the Nether. |
| block_drops | Drop blocks | true or false | true | Controls resource drops from blocks, including experience orbs. |
| block_explosion_drop_decay | In block interaction explosions, some blocks won't drop their loot | true or false | true | Some of the drops from blocks destroyed by explosions caused by block interactions are lost in the explosion. |
| command_block_output | Broadcast command block output | true or false | true | Command blocks report what their commands did in the chat of operators. |
| command_blocks_work | Enable Command Blocks | true or false | true | Command blocks run their commands. Off, they do nothing when powered. |
| drowning_damage | Deal drowning damage | true or false | true | Players take damage when they run out of air under water. |
| elytra_movement_check | Do elytra movement check | true or false | true | The server checks how fast players fly with Elytra and rejects moves that are too fast. |
| ender_pearls_vanish_on_death | Thrown Ender Pearls vanish on death | true or false | true | Whether Ender Pearls thrown by a player vanish when that player dies. |
| entity_drops | Drop entity equipment | true or false | true | Controls drops from Minecarts (including inventories), Item Frames, Boats, etc. |
| fall_damage | Deal fall damage | true or false | true | Players take damage from falling. |
| fire_damage | Deal fire damage | true or false | true | Players take damage from fire, lava and other burning sources. |
| fire_spread_radius_around_player | Fire spread radius | Whole number (at least -1) | 128 | The radius in blocks around a player in which fire can spread. |
| forgive_dead_players | Forgive dead players | true or false | true | Angered neutral mobs stop being angry when the targeted player dies nearby. |
| freeze_damage | Deal freeze damage | true or false | true | Players take damage from freezing in Powder Snow. |
| global_sound_events | Global sound events | true or false | true | When certain game events happen, like a boss spawning, the sound is heard everywhere. |
| immediate_respawn | Respawn immediately | true or false | false | Players respawn at once when they die, without the death screen. |
| keep_inventory | Keep inventory after death | true or false | false | Players keep their items and experience when they die. |
| lava_source_conversion | Lava converts to source | true or false | false | When flowing lava is surrounded on two sides by lava sources, it converts into a source. |
| limited_crafting | Require recipe for crafting | true or false | false | If enabled, players will be able to craft only unlocked recipes. |
| locator_bar | Enable player Locator Bar | true or false | true | When enabled, a bar is shown on the screen to indicate the direction of players. |
| log_admin_commands | Broadcast admin commands | true or false | true | Commands run by operators are shown to the other operators and written to the server log. |
| max_block_modifications | Command modification block limit | Whole number (at least 1) | 32768 | The number of blocks that can be changed at once by one command, such as fill or clone. |
| max_command_forks | Command context limit | Whole number (at least 0) | 65536 | Maximum number of contexts that can be used by commands like 'execute as'. |
| max_command_sequence_length | Command chain size limit | Whole number (at least 0) | 65536 | Applies to command block chains and functions. |
| max_entity_cramming | Entity cramming threshold | Whole number (at least 0) | 24 | How many mobs and players can be pushed into one spot before they start taking damage. 0 turns the damage off. |
| max_minecart_speed | Minecart max speed | Whole number (from 1 to 1000) | 8, only in worlds with the Minecart Improvements experiment | Maximum default speed of a moving Minecart on land. |
| max_snow_accumulation_height | Snow accumulation height | Whole number (from 0 to 8) | 1 | When it snows, layers of snow form on the ground up to at most this number of layers. |
| mob_drops | Drop mob loot | true or false | true | Controls resource drops from mobs, including experience orbs. |
| mob_explosion_drop_decay | In mob explosions, some blocks won't drop their loot | true or false | true | Some of the drops from blocks destroyed by explosions caused by mobs are lost in the explosion. |
| mob_griefing | Allow destructive mob actions | true or false | true | Mobs can change blocks (Creepers blowing up blocks, Endermen taking blocks, Zombies breaking doors) and pick up items. |
| natural_health_regeneration | Regenerate health | true or false | true | Players regain health over time when their hunger bar is full enough. |
| player_movement_check | Do player movement check | true or false | true | The server checks how fast players move and rejects moves that are too fast. |
| players_nether_portal_creative_delay | Player's Nether Portal delay in creative mode | Whole number (at least 0) | 0 | Time (in ticks) that a creative mode player needs to stand in a Nether Portal before changing dimensions. |
| players_nether_portal_default_delay | Player's Nether Portal delay in non-creative mode | Whole number (at least 0) | 80 | Time (in ticks) that a non-creative mode player needs to stand in a Nether Portal before changing dimensions. |
| players_sleeping_percentage | Sleep percentage | Whole number (at least 0) | 100 | The percentage of players who must be sleeping to skip the night. |
| projectiles_can_break_blocks | Projectiles can break blocks | true or false | true | Controls whether impact projectiles will destroy blocks that are destructible by them. |
| pvp | Enable pvp | true or false | true | Controls whether players are allowed to damage other players. |
| raids | Do raids | true or false | true | Raids start when a player with Bad Omen enters a village. |
| random_tick_speed | Random tick speed rate | Whole number (at least 0) | 3 | How many blocks per section of a chunk get a random update each tick. Crops, saplings, fire, ice and leaves depend on it. 0 stops them. |
| reduced_debug_info | Reduce debug info | true or false | false | Limits contents of debug screen. |
| respawn_radius | Respawn location radius | Whole number (at least 0) | 10 | Controls the size of the area around the spawn point that players can spawn in. |
| send_command_feedback | Send command feedback | true or false | true | Players see the chat messages that commands send back. |
| show_advancement_messages | Announce advancements | true or false | true | Earned advancements are announced in chat. |
| show_death_messages | Show death messages | true or false | true | Player deaths are announced in chat. |
| spawn_mobs | Spawn mobs | true or false | true | Some entities might have separate rules. |
| spawn_monsters | Spawn Monsters | true or false | true | Controls whether monsters naturally spawn. |
| spawn_patrols | Spawn pillager patrols | true or false | true | Pillager patrols spawn. |
| spawn_phantoms | Spawn phantoms | true or false | true | Phantoms spawn near players who have not slept. |
| spawn_wandering_traders | Spawn Wandering Traders | true or false | true | Wandering Traders appear near players. |
| spawn_wardens | Spawn Wardens | true or false | true | Sculk Shriekers can summon Wardens. |
| spawner_blocks_work | Enable Spawner Blocks | true or false | true | Monster Spawners and Trial Spawners spawn mobs. |
| spectators_generate_chunks | Allow spectators to generate terrain | true or false | true | Players in Spectator mode load and generate new land as they fly. |
| spread_vines | Vines spread | true or false | true | Controls whether the Vines block spreads randomly to adjacent blocks. Does not affect other types of vine blocks such as Weeping Vines, Twisting Vines, etc. |
| tnt_explodes | Allow TNT to be activated and to explode | true or false | true | TNT explodes when lit. Off, it does nothing. |
| tnt_explosion_drop_decay | In TNT explosions, some blocks won't drop their loot | true or false | false | Some of the drops from blocks destroyed by explosions caused by TNT are lost in the explosion. |
| universal_anger | Universal anger | true or false | false | Angered neutral mobs attack any nearby player, not just the player that angered them. Works best if forgive_dead_players is disabled. |
| water_source_conversion | Water converts to source | true or false | true | When flowing water is surrounded on two sides by water sources, it converts into a source. |
/gamerule keep_inventory truePlayers keep their items and experience when they die.
/gamerule keep_inventoryShows the rule's current value.



