Using gamerules in Minecraft

Gamerules control various aspects of the gameplay and provide a lot of customization for server owners. Check out the steps below on how to use gamerules and for a master list of all the available Minecraft gamerules for Java Edition and Bedrock Edition as of Minecraft version 1.20.40.
Gamerule Commands
How to Set the Value
/gamerule <rule name> <value>
How to Get the Current Value
/gamerule <rule name>
A
rule name
is the name of the specific gamerule that you would like to set, or view. A list of these can be seen below.The
value
is the value you wish to assign to a specific rule name. In the majority of cases, this is a booleantrue
orfalse
value, but can sometimes be a number.Each command must be entered into either an Admin/OP's chat in game or in the server console.
For Bedrock servers when the command is entered in the server console the "/" must be obmitted, otherwise the following error will occur:
Unknown command: /. Please check that the command exists and that you have permission to use it.
The following example uses the gamerule fallDamage in the Nodecraft server console for Java:
List of Gamerules
Rule Name | Description | Possible Values | Default Value | Java Edition | Bedrock Edition |
---|---|---|---|---|---|
allowFireTicksAwayFromPlayer | Whether fire and lava ticks can occur outside of an 8 chunk range of a player. | true/false | false | βοΈ | β |
announceAdvancements | Whether advancements should be announced in chat | true/false | true | βοΈ | β |
blockExplosionDropDecay | Whether block loot is dropped by all blocks (false) or randomly (true) depending on how far the block is from the center of a block explosion (e.g. clicking a bed in dimensions other than the Overworld). | true/false | true | βοΈ | β |
commandBlocksEnabled | Whether command blocks should be enabled in-game | true/false | true | β | βοΈ |
commandBlockOutput | Whether command blocks should notify admins when they perform commands | true/false | true | βοΈ | βοΈ |
commandModificationBlockLimit | Controls the maximum number of blocks changed when using /clone, /fill, or /fillbiome. | # (number) | 32768 | βοΈ | β |
disableElytraMovementCheck | Whether the server should skip checking player speed when the player is wearing elytra | true/false | false | βοΈ | β |
disablePlayerMovementCheck | Whether the server should skip checking player speed. | true/false | false | βοΈ | β |
disableRaids | Whether raids are disabled or not | true/false | false | βοΈ | β |
doDaylightCycle | Whether the day-night cycle and moon phases progress | true/false | true | βοΈ | βοΈ |
doEntityDrops | Whether entities that are not mobs should have drops | true/false | true | βοΈ | βοΈ |
doFireTick | Whether fire should spread and naturally extinguish | true/false | true | βοΈ | βοΈ |
doInsomnia | Whether phantoms can spawn in the nightmare | true/false | true | βοΈ | βοΈ |
doImmediateRespawn | Players respawn immediately without showing the death screen. (Bedrock: immediateRespawn) | true/false | false | βοΈ | βοΈ |
doLimitedCrafting | Whether players should only be able to craft recipes that they've unlocked first | true/false | false | βοΈ | β |
doMobLoot | Whether mobs should drop items | true/false | true | βοΈ | βοΈ |
doMobSpawning | Whether mobs should naturally spawn | true/false | true | βοΈ | βοΈ |
doPatrolSpawning | Whether patrols can spawn | true/false | true | βοΈ | β |
doTileDrops | Whether blocks should have drops | true/false | true | βοΈ | βοΈ |
doTraderSpawning | Whether wandering traders can spawn | true/false | true | βοΈ | β |
doVinesSpread | Whether vines can spread to other blocks. Cave vines, weeping vines, and twisting vines are not affected. | true/false | true | βοΈ | β |
doWeatherCycle | Whether the weather will change | true/false | true | βοΈ | βοΈ |
doWardenSpawning | Whether wardens can spawn. | true/false | true | βοΈ | β |
drowningDamage | Whether the player should take damage when drowning | true/false | true | βοΈ | βοΈ |
enderPearlsVanishOnDeath | Controls whether thrown ender pearls vanish when the player dies. | true/false | true | βοΈ | β |
fallDamage | Whether the player should take fall damage | true/false | true/false | βοΈ | βοΈ |
fireDamage | Whether the player should take fire damage | true/false | true | βοΈ | βοΈ |
forgiveDeadPlayers | Makes angered neutral mobs stop being angry when the targeted player dies nearby. | true/false | true | βοΈ | β |
freezeDamage | Whether the player should take damage when inside powder snow | true/false | true | βοΈ | βοΈ |
functionCommandLimit | The maximum number of commands that can be executed by /function at once | # (number) | 10000 | β | βοΈ |
globalSoundEvents | Whether certain sound events are heard by all players regardless of location. | true/false | true | βοΈ | β |
keepInventory | Whether the player should keep items in their inventory after death | true/false | false | βοΈ | βοΈ |
lavaSourceConversion | Whether new sources of lava are allowed to form. | true/false | false | βοΈ | β |
logAdminCommands | Whether to log admin commands to server log | true/false | true | βοΈ | β |
maxCommandChainLength | Determines the number at which the chain command block acts as a "chain" | # (number) | 65536 | βοΈ | βοΈ |
maxCommandForkCount | Modifies the maximum number of forks in a function or command block that can be created during one tick. | # (number) | 65536 | βοΈ | β |
maxEntityCramming | The maximum number of pushable entities another entity can try to push, before taking suffocation damage. Setting to 0 disables the rule. Affects players and mobs only (excluding bats) | # (number) | 24 | βοΈ | β |
minecartMaxSpeed | The maximum speed in which minecarts can go. | # (number) | 8 | βοΈ | β |
mobExplosionDropDecay | Whether block loot is dropped by all blocks (false) or randomly (true) depending on how far the block is from the center of a mob explosion (e.g. Creeper explosion). | true/false | true | βοΈ | β |
mobGriefing | Whether creepers, zombies, endermen, ghasts, withers, ender dragons, rabbits, sheep, and villagers should be able to change blocks and whether villagers, zombies, skeletons, and zombie pigmen can pick up items | true/false | true | βοΈ | βοΈ |
naturalRegeneration | Whether the player can regenerate health naturally if their hunger is full enough (doesn't affect external healing, such as golden apples, the Regeneration effect, etc.) | true/false | true | βοΈ | βοΈ |
playersNetherPortalCreativeDelay | Control how many ticks the player in Survival or Adventure mode has to wait in the nether portal in order to travel through dimensions through it. | # (number) | 1 | βοΈ | β |
playersNetherPortalDefaultDelay | What percentage of players in the Overworld must sleep to skip the night. A percentage value of 0 or less will allow the night to be skipped by just 1 player, and a percentage value more than 100 will prevent players from ever skipping the night. | # (number) | 80 | βοΈ | β |
playersSleepingPercentage | What percentage of players must sleep to skip the night. | # (number) | 100 | βοΈ | β |
projectilesCanBreakBlocks | Control whenever do projectiles can break blocks (like trident breaks pointed dripstone). | true/false | true | βοΈ | β |
pvp | Whether the player can fight with other players | true/false | true | β | βοΈ |
randomTickSpeed | How often a random block tick occurs (such as plant growth, leaf decay, etc.) per chunk section per game tick. 0 will disable random ticks, higher numbers will increase random ticks | # (number) | 3 (Java) / 1 (Bedrock) | βοΈ | βοΈ |
recipesUnlock | Controls whether the player needs to collect items to unlock recipes in the recipe book. | true/false | true | β | βοΈ |
reducedDebugInfo | Whether the debug screen shows all or reduced information; and whether the effects of F3+B (entity hitboxes) and F3+G (chunk boundaries) are shown | true/false | false | βοΈ | β |
respawnBlocksExplode | Prevents beds/respawn anchors from exploding in other dimensions. | true/false | true | β | βοΈ |
sendCommandFeedback | Whether the feedback from commands executed by a player should show up in chat. Also affects the default behavior of whether command blocks store their output text | true/false | true | βοΈ | βοΈ |
showBorderEffect | Whether border blocks create red particles that float up to indicate a border. | true/false | true | β | βοΈ |
showCoordinates | Whether the player's coordinates are displayed | true/false | true | β | βοΈ |
showDeathMessages | Whether a message appears in chat when a player dies | true/false | true | βοΈ | βοΈ |
showTags | Hides the "Can place on" and "Can destroy" block lists from item lore, as well as item lock indicators. | true/false | true | β | βοΈ |
snowAccumulationHeight | The maximum number of snow layers that can be accumulated on each block. | true/false | 1 | βοΈ | β |
spawnChunkRadius | Control the radius of the spawn chunk. | true/false | 2 | βοΈ | β |
spawnRadius | The number of blocks outward from the world spawn coordinates that a player will spawn in when first joining a server or when dying without a spawnpoint | # (number) | 10 (Java) / 5 (Bedrock) | βοΈ | βοΈ |
spectatorsGenerateChunks | Whether players in spectator mode can generate chunks | true/false | true | βοΈ | β |
tntExplodes | Whether TNT will explode or not after activation | true/false | true | β | βοΈ |
tntExplosionDropDecay | Whether block loot is dropped by all blocks (false) or randomly (true) depending on how far the block is from the center of a TNT explosion. | true/false | false | βοΈ | β |
universalAnger | Makes angered neutral mobs attack any nearby player, not just the player that angered them. Works best if you disable forgiveDeadPlayers. | true/false | false | βοΈ | β |
waterSourceConversion | Whether new sources of water are allowed to form. | true/false | true | βοΈ | β |
List accurate as of Minecraft 1.20.40
β οΈNote: Gamerules are an advanced feature of Minecraft. Invalid or misuse of gamerules can cause unpredictable or damaging behavior.
For more information about gamerules, and the effects they can have on gameplay, be sure to reference the Minecraft Gamerule Wiki.
Need Help?
If you have questions or run into any issues, our support team is here to help! Reach out using the support widget on our website or visit our support center for further assistance.