Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsGame rules

Switch game

23 Wikis · pick your game
Game Rules

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.

Details

Change a rule/gamerule <rule> <value>
See a rule's value/gamerule <rule>
In the menuThe same rules are set under Game Rules when a world is created

Every game rule

advance_timeAdvance time of daytrue or falsetrueThe time of day moves on. Off, the sun and moon stay where they are.
advance_weatherUpdate weathertrue or falsetrueThe weather changes by itself. Off, the current weather stays.
allow_entering_nether_using_portalsAllow Nethertrue or falsetrueControls whether players are allowed to enter the Nether.
block_dropsDrop blockstrue or falsetrueControls resource drops from blocks, including experience orbs.
block_explosion_drop_decayIn block interaction explosions, some blocks won't drop their loottrue or falsetrueSome of the drops from blocks destroyed by explosions caused by block interactions are lost in the explosion.
command_block_outputBroadcast command block outputtrue or falsetrueCommand blocks report what their commands did in the chat of operators.
command_blocks_workEnable Command Blockstrue or falsetrueCommand blocks run their commands. Off, they do nothing when powered.
drowning_damageDeal drowning damagetrue or falsetruePlayers take damage when they run out of air under water.
elytra_movement_checkDo elytra movement checktrue or falsetrueThe server checks how fast players fly with Elytra and rejects moves that are too fast.
ender_pearls_vanish_on_deathThrown Ender Pearls vanish on deathtrue or falsetrueWhether Ender Pearls thrown by a player vanish when that player dies.
entity_dropsDrop entity equipmenttrue or falsetrueControls drops from Minecarts (including inventories), Item Frames, Boats, etc.
fall_damageDeal fall damagetrue or falsetruePlayers take damage from falling.
fire_damageDeal fire damagetrue or falsetruePlayers take damage from fire, lava and other burning sources.
fire_spread_radius_around_playerFire spread radiusWhole number (at least -1)128The radius in blocks around a player in which fire can spread.
forgive_dead_playersForgive dead playerstrue or falsetrueAngered neutral mobs stop being angry when the targeted player dies nearby.
freeze_damageDeal freeze damagetrue or falsetruePlayers take damage from freezing in Powder Snow.
global_sound_eventsGlobal sound eventstrue or falsetrueWhen certain game events happen, like a boss spawning, the sound is heard everywhere.
immediate_respawnRespawn immediatelytrue or falsefalsePlayers respawn at once when they die, without the death screen.
keep_inventoryKeep inventory after deathtrue or falsefalsePlayers keep their items and experience when they die.
lava_source_conversionLava converts to sourcetrue or falsefalseWhen flowing lava is surrounded on two sides by lava sources, it converts into a source.
limited_craftingRequire recipe for craftingtrue or falsefalseIf enabled, players will be able to craft only unlocked recipes.
locator_barEnable player Locator Bartrue or falsetrueWhen enabled, a bar is shown on the screen to indicate the direction of players.
log_admin_commandsBroadcast admin commandstrue or falsetrueCommands run by operators are shown to the other operators and written to the server log.
max_block_modificationsCommand modification block limitWhole number (at least 1)32768The number of blocks that can be changed at once by one command, such as fill or clone.
max_command_forksCommand context limitWhole number (at least 0)65536Maximum number of contexts that can be used by commands like 'execute as'.
max_command_sequence_lengthCommand chain size limitWhole number (at least 0)65536Applies to command block chains and functions.
max_entity_crammingEntity cramming thresholdWhole number (at least 0)24How many mobs and players can be pushed into one spot before they start taking damage. 0 turns the damage off.
max_minecart_speedMinecart max speedWhole number (from 1 to 1000)8, only in worlds with the Minecart Improvements experimentMaximum default speed of a moving Minecart on land.
max_snow_accumulation_heightSnow accumulation heightWhole number (from 0 to 8)1When it snows, layers of snow form on the ground up to at most this number of layers.
mob_dropsDrop mob loottrue or falsetrueControls resource drops from mobs, including experience orbs.
mob_explosion_drop_decayIn mob explosions, some blocks won't drop their loottrue or falsetrueSome of the drops from blocks destroyed by explosions caused by mobs are lost in the explosion.
mob_griefingAllow destructive mob actionstrue or falsetrueMobs can change blocks (Creepers blowing up blocks, Endermen taking blocks, Zombies breaking doors) and pick up items.
natural_health_regenerationRegenerate healthtrue or falsetruePlayers regain health over time when their hunger bar is full enough.
player_movement_checkDo player movement checktrue or falsetrueThe server checks how fast players move and rejects moves that are too fast.
players_nether_portal_creative_delayPlayer's Nether Portal delay in creative modeWhole number (at least 0)0Time (in ticks) that a creative mode player needs to stand in a Nether Portal before changing dimensions.
players_nether_portal_default_delayPlayer's Nether Portal delay in non-creative modeWhole number (at least 0)80Time (in ticks) that a non-creative mode player needs to stand in a Nether Portal before changing dimensions.
players_sleeping_percentageSleep percentageWhole number (at least 0)100The percentage of players who must be sleeping to skip the night.
projectiles_can_break_blocksProjectiles can break blockstrue or falsetrueControls whether impact projectiles will destroy blocks that are destructible by them.
pvpEnable pvptrue or falsetrueControls whether players are allowed to damage other players.
raidsDo raidstrue or falsetrueRaids start when a player with Bad Omen enters a village.
random_tick_speedRandom tick speed rateWhole number (at least 0)3How 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_infoReduce debug infotrue or falsefalseLimits contents of debug screen.
respawn_radiusRespawn location radiusWhole number (at least 0)10Controls the size of the area around the spawn point that players can spawn in.
send_command_feedbackSend command feedbacktrue or falsetruePlayers see the chat messages that commands send back.
show_advancement_messagesAnnounce advancementstrue or falsetrueEarned advancements are announced in chat.
show_death_messagesShow death messagestrue or falsetruePlayer deaths are announced in chat.
spawn_mobsSpawn mobstrue or falsetrueSome entities might have separate rules.
spawn_monstersSpawn Monsterstrue or falsetrueControls whether monsters naturally spawn.
spawn_patrolsSpawn pillager patrolstrue or falsetruePillager patrols spawn.
spawn_phantomsSpawn phantomstrue or falsetruePhantoms spawn near players who have not slept.
spawn_wandering_tradersSpawn Wandering Traderstrue or falsetrueWandering Traders appear near players.
spawn_wardensSpawn Wardenstrue or falsetrueSculk Shriekers can summon Wardens.
spawner_blocks_workEnable Spawner Blockstrue or falsetrueMonster Spawners and Trial Spawners spawn mobs.
spectators_generate_chunksAllow spectators to generate terraintrue or falsetruePlayers in Spectator mode load and generate new land as they fly.
spread_vinesVines spreadtrue or falsetrueControls 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_explodesAllow TNT to be activated and to explodetrue or falsetrueTNT explodes when lit. Off, it does nothing.
tnt_explosion_drop_decayIn TNT explosions, some blocks won't drop their loottrue or falsefalseSome of the drops from blocks destroyed by explosions caused by TNT are lost in the explosion.
universal_angerUniversal angertrue or falsefalseAngered neutral mobs attack any nearby player, not just the player that angered them. Works best if forgive_dead_players is disabled.
water_source_conversionWater converts to sourcetrue or falsetrueWhen flowing water is surrounded on two sides by water sources, it converts into a source.

Examples

/gamerule keep_inventory true

Players keep their items and experience when they die.

/gamerule keep_inventory

Shows the rule's current value.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)