Using gamerules in Minecraft

Game Rules control various aspects of the game play and provide additional customization for your server. You can run the game rules in console or in game as OP. There's a lot of other Minecraft game rule changes but these are some of the more commonly used. To use these commands you'll need to start the command with /gamerule in game or gamerule in console.

Rule NameDescriptionPossible ValuesDefault ValueVersion
announceAdvancementsWhether advancements should be announced in chattrue/falsetrue1.12+
mobGriefingWhether mobs should be able to change blocks, and whether mobs can pick up items.true/falsetrue1.4+
disableElytraMovementCheckWhether the server should skip checking player speed when the player is wearing elytra. This can help with lag.true/falsefalse1.9+
disableRaidsWhether raids are disabled or nottrue/falsefalse1.14+
doTraderSpawningWhether wandering traders can spawntrue/falsetrue1.15+
doWeatherCycleWhether the weather will changetrue/falsetrue1.15+
doDaylightCycleWhether the day-night cycle and moon phases progresstrue/falsetrue1.6+
playersSleepingPercentageWhat percentage of players must sleep to skip the night.0-1001001.17+
keepInventoryWhether the player should keep items and experience in their inventory after deathtrue/falsefalse1.4+
spawnRadiusThe number of blocks outward from the world spawn coordinates that a player spawns in when first joining a server or when dying without a personal spawnpoint0-?101.9+
commandBlockOutputWhether command blocks should notify admins when they perform commandstrue/falsefalse1.4+
doEntityDropsWhether entities that are not mobs should have dropstrue/falsetrue1.8+
doFireTickWhether fire should spread and naturally extinguishtrue/falsetrue1.4+
fallDamageWhether the player should take fall damagetrue/falsetrue1.15+
drowningDamageWhether the player should take damage when drowningtrue/falsetrue1.15+
doInsomniaWhether phantoms can spawn in the nighttimetrue/falsetrue1.16+
maxEntityCrammingThe maximum number of pushable entities a mob or player can push, before taking 6♥♥♥ entity cramming damage per half-second. Setting to 0 or lower disables the rule. Damage affects Survival-mode or Adventure-mode players, and all mobs but bats. Pushable entities include non-Spectator-mode players, any mob except bats, as well as boats and minecarts.0-100241.11+