The /gamerule Command: How to Change Game Rules

00:25, 05 January 2026
views111
???0
likes0
The /gamerule Command: How to Change Game Rules

The /gamerule command is used to change fundamental game settings. With it, you can stop the day-night cycle, prevent fire from spreading, or customize character death mechanics. Settings are applied instantly and saved in the world files, so they do not need to be re-entered every time you enter the game.

Article Navigation

To use the command, administrator rights are required (cheats must be enabled in the world or server settings).

How to Enter the Command

The command syntax looks like this:

/gamerule <rule_name> [value]

There are two types of values:

  1. Boolean: true (enabled) or false (disabled).
  2. Integer: A whole number to adjust the intensity of processes.

If you enter the command without a value — /gamerule <rule_name>, the chat will display the current status of that rule.

List of All Game Rules

The table below collects the main rules available in current versions of the game.

RuleDescriptionPossible ValuesDefault Value
announceAdvancementsWhether to announce in chat when players unlock advancements.true or falsetrue
commandBlockOutputWhether command blocks should notify administrators in chat when they perform commands.true or falsetrue
disableElytraMovementCheckDisables the server's check on player movement speed when flying with elytra (anti-cheat).true or falsefalse
disableRaidsCompletely disables the possibility of pillager raids triggering on villages.true or falsefalse
doDaylightCycleWhether time advances in the day/night cycle. If set to false, time will stop at the current moment.true or falsetrue
doEntityDropsWhether entities that are not mobs (e.g., minecarts) should drop items when destroyed.true or falsetrue
doFireTickWhether fire should naturally spread to blocks and then extinguish.true or falsetrue
doImmediateRespawnWhether the player will respawn immediately without seeing the death screen and respawn menu.true or falsefalse
doInsomniaWhether phantoms will spawn at night if the player has not slept for a long time.true or falsetrue
doLimitedCraftingLimits item crafting to only those recipes the player has already unlocked.true or falsefalse
doMobLootWhether mobs should drop experience and items (loot) when killed.true or falsetrue
doMobSpawningWhether mobs should spawn naturally in the world (due to darkness or biome conditions).true or falsetrue
doPatrolSpawningWhether random pillager patrols should spawn in the world.true or falsetrue
doTileDropsWhether blocks should drop items when destroyed.true or falsetrue
doTraderSpawningWhether wandering traders should periodically spawn near the player.true or falsetrue
doWeatherCycleWhether the weather changes. If set to false, the weather will stay in the current cycle (e.g., eternal rain).true or falsetrue
drowningDamageWhether running out of air underwater causes damage to the player (drowning).true or falsetrue
fallDamageWhether falling from a height causes damage to the character's health.true or falsetrue
fireDamageWhether fire, lava, or burning causes damage to the character.true or falsetrue
forgiveDeadPlayersWhether angry neutral mobs stop being angry (aggroed) when the target player dies.true or falsetrue
freezeDamageWhether powder snow causes freezing damage to a player standing in it.true or falsetrue
keepInventoryWhether players keep their inventory and experience after death.true or falsefalse
logAdminCommandsWhether executed admin commands are added to the server's system log.true or falsetrue
maxCommandChainLengthThe maximum number of commands that can run in a chain during a single tick.<Number>65536
maxEntityCrammingThe maximum number of entities that can inhabit one block before taking suffocation damage.<Number>24
mobGriefingWhether mobs can pick up items, trample crops, or destroy blocks (creeper explosions).true or falsetrue
naturalRegenerationWhether players can regenerate health naturally via a full hunger bar.true or falsetrue
playersSleepingPercentageThe percentage of players on a server who must sleep to skip the night.<Number>100
randomTickSpeedSets the speed at which random events occur (plant growth, ice melting). 0 disables random ticks.<Number>3
reducedDebugInfoWhether the debug screen (F3) hides extended technical information.true or falsefalse
sendCommandFeedbackWhether feedback (messages) from executed commands appears in the chat.true or falsetrue
showDeathMessagesWhether a message appears in the global chat when a player dies.true or falsetrue
spawnRadiusDefines the number of blocks from the world spawn point where a player can spawn.<Number>10
spectatorsGenerateChunksWhether players in spectator mode can load (generate) new chunks.true or falsetrue
universalAngerWhether angry neutral mobs will attack any nearby players, not just the offender.true or falsefalse

How to remove command messages from chat

To clear the chat of system notifications, the rule sendCommandFeedback is used. If set to false, the game will stop sending confirmations about actions performed by the administrator.

  • Command: /gamerule sendCommandFeedback false

How to disable fall damage

The rule responsible for this is fallDamage. With a value of false, the character will stop losing health when falling from any height. This is useful when building tall objects in survival mode.

  • Command: /gamerule fallDamage false

How to disable phantom spawning

The mechanic of flying mobs appearing during insomnia is regulated by the rule doInsomnia. If set to false, phantoms will stop spawning in the world, even if the character has not slept for many nights in a row.

  • Command: /gamerule doInsomnia false

How to disable command execution output in chat

When command blocks are working on a map, the chat might become inconvenient for communication. To stop this, use the rule commandBlockOutput. This will hide all notifications about actions performed by command blocks.

  • Command: /gamerule commandBlockOutput false

How to speed up plant growth and tick speed

The speed of random events (wheat growth, saplings, grass spread) is regulated by the parameter randomTickSpeed. The standard value for Java is 3, and for Bedrock it is 1. Increasing this number will speed up farms, but values that are too high may cause lag or a world crash.

  • Example (speed up by 10 times): /gamerule randomTickSpeed 30

How to disable item dropping after death

The rule keepInventory allows you to keep all items and accumulated experience after death. The character will respawn at the spawn point with a full inventory.

  • Command: /gamerule keepInventory true

How to disable block destruction by creepers

To protect the landscape and buildings, the rule mobGriefing is used. In this case, creeper explosions will inflict damage only on players and mobs without breaking blocks. This will also prohibit endermen from stealing dirt blocks.

  • Command: /gamerule mobGriefing false

Published by: TNT

Category: Guides
Rating
Score 0 (0 votes)

Leave a comment