Gamerules allow you to customize gameplay mechanics on your Minecraft server without using mods or plugins. You can control everything from mob spawning to weather cycles using simple commands. This guide shows you how to use gamerules and provides a reference of common gamerules and their effects.
Using Gamerules
Gamerules are changed using in-game commands. You must have operator permissions to run gamerule commands. See our guide on How to Grant Operator Permissions if you need OP status.
Basic gamerule syntax:
/gamerule <rule> <value>
Examples:
/gamerule doDaylightCycle false- Stops time from progressing/gamerule keepInventory true- Players keep items when they die/gamerule doMobSpawning false- Prevents mobs from spawning
Common Gamerules
Here are the most commonly used gamerules and their effects:
| Gamerule | Default | Description |
|---|---|---|
announceAdvancements | true | Whether advancements are announced in chat when earned |
commandBlockOutput | true | Whether command blocks should output to chat |
disableElytraMovementCheck | false | Disables the server checking if players are moving too fast with elytra |
doDaylightCycle | true | Whether the day-night cycle progresses |
doEntityDrops | true | Whether entities drop items when killed |
doFireTick | true | Whether fire spreads and burns out naturally |
doImmediateRespawn | false | Players respawn immediately without seeing the death screen |
doInsomnia | true | Whether phantoms spawn when players haven't slept |
doLimitedCrafting | false | Whether players can only craft recipes they've unlocked |
doMobLoot | true | Whether mobs drop items when killed |
doMobSpawning | true | Whether mobs spawn naturally |
doPatrolSpawning | true | Whether pillager patrols spawn |
doTileDrops | true | Whether broken blocks drop as items |
doTraderSpawning | true | Whether wandering traders spawn |
doWeatherCycle | true | Whether weather changes naturally |
drowningDamage | true | Whether players take drowning damage |
fallDamage | true | Whether players and mobs take fall damage |
fireDamage | true | Whether players and mobs take fire damage |
forgiveDeadPlayers | true | Whether angry mobs stop being angry when the targeted player dies |
freezeDamage | true | Whether players take damage from freezing in powder snow |
keepInventory | false | Whether players keep their inventory when they die |
maxCommandChainLength | 65536 | Maximum number of chained command blocks that can run in one tick |
maxEntityCramming | 24 | Maximum number of entities that can be crammed into one block |
mobGriefing | true | Whether mobs can modify the world (creeper explosions, endermen picking up blocks, etc.) |
naturalRegeneration | true | Whether players regenerate health naturally when hunger is full |
playersSleepingPercentage | 100 | Percentage of players that must sleep to skip the night |
randomTickSpeed | 3 | How often random block updates occur (crop growth, grass spreading, etc.) |
reducedDebugInfo | false | Whether to show reduced information on the debug screen (F3) |
sendCommandFeedback | true | Whether command output is sent to players who run commands |
showDeathMessages | true | Whether death messages appear in chat |
spawnRadius | 10 | Radius around world spawn where players can spawn |
spectatorsGenerateChunks | true | Whether spectators cause chunks to load |
universalAnger | false | Whether angered neutral mobs attack any nearby player, not just the attacker |
Troubleshooting
- Cannot run gamerule commands. Ensure you have operator permissions. Use
/op <playername>in the console to grant OP status. - Gamerule not taking effect. Some gamerules only affect new events (e.g.,
doMobSpawningwon't remove existing mobs, only prevent new spawns). Double-check the gamerule value with/gamerule <rule>. - Gamerule not available. Some gamerules are version-specific. Ensure you're using the correct gamerule name for your Minecraft version.
- Changes reset after restart. Gamerule changes are saved with the world data. If they reset, the world may not be saving properly or you may be loading a different world.
- Players bypass gamerules. Creative mode and OP players may bypass some gamerule restrictions. Ensure players are in the correct game mode.
Using gamerules on your Minecraft server allows you to customize gameplay without installing mods or plugins. Whether you want to create a peaceful building environment or a challenging survival experience, gamerules give you precise control over game mechanics.

Minecraft