Minecraft game rules control how a world behaves, straight from inside the game: inventory loss, PvP, mob behaviour, time of day, weather and random ticks. No mods required. If you still need to get a server running first, creating a Minecraft server covers the basics.

Since Java Edition 26.2, though, the way these rules are named has changed fundamentally. Game rules now use snake_case instead of camelCase, which means plenty of older guides list commands that simply fail on a current server. This article documents the complete list for Java Edition 26.2, as of July 2026. Minecraft has used the year.drop.hotfix versioning scheme since December 2025, so 2026 releases start with 26.

Minecraft game rules – night-time library of bookshelves with seven floating, colourfully glowing books above a lectern

What you will learn

  • why older Minecraft game rule commands stopped working with 26.2
  • how the current /gamerule command is structured and how to query a value
  • which game rules exist in Java Edition 26.2 and what their defaults are
  • which rules you actually reach for: inventory, PvP, sleeping, mob behaviour and world updates
  • how game rules differ from settings in server.properties

Table of contents

What changed: snake_case instead of camelCase

Since version 26.2 the game rules live in a registry and use snake_case, so the names consist of lowercase letters and underscores.

The switch was not just a change of spelling for every rule. Several game rules were also renamed outright. That is exactly why you should not rely on older lists when working on a current server.

Four rules arrived with snapshot 25w35a as replacements for former server.properties entries:

Game ruleReplaces the former entry
allow_entering_nether_using_portalsallow-nether
command_blocks_workenable-command-block
pvppvp
spawn_monstersspawn-monsters

Writing those values into server.properties achieves nothing today. For the current state of that file, see Minecraft server.properties explained.

Important
Use the snake_case names listed in this article. A command copied from an older guide can fail for no other reason than an outdated rule name.

The /gamerule command

The Minecraft gamerule command has this syntax:

/gamerule <rule> [<value>]

Pass only the rule and Minecraft reports its current value:

/gamerule keep_inventory

Add a value to change it:

/gamerule keep_inventory true

Most game rules require cheats to be enabled. In the tables below, the "Cheats" column tells you whether a rule can only be changed with cheats on.

Since 26.2, the game rules are also reachable in-game through the pause menu under the world options, including a search function.

Game rules always belong to the world. They take effect immediately, survive server restarts, and on a server running several worlds they have to be set per world.

Every game rule at a glance

The list below is grouped by area. "Boolean" means the rule takes true or false. "Integer" expects a whole number.

Chat

These rules govern command output, logging and the messages shown to players or admins.

RuleTypeDefaultMeaningCheats
command_block_outputBooleantruecommand blocks notify adminsyes
log_admin_commandsBooleantruelog admin commands to the server logyes
send_command_feedbackBooleantrueshow command feedback in chatyes
show_advancement_messagesBooleantrueannounce advancements in chatyes
show_death_messagesBooleantrueshow death messages in chatno

Drops

These rules affect whether blocks, mobs and other entities leave loot, and how explosions interact with drops.

RuleTypeDefaultMeaningCheats
block_dropsBooleantrueblocks leave items when brokenno
block_explosion_drop_decayBooleantrueblock loot drops randomly based on distance from the explosionyes
entity_dropsBooleantruenon-mob entities leave itemsyes
mob_dropsBooleantruemobs drop items and experience orbsno
mob_explosion_drop_decayBooleantrueblock loot after mob explosions drops randomlyyes
projectiles_can_break_blocksBooleantrueprojectiles destroy destructible blocksno
tnt_explosion_drop_decayBooleanfalseblock loot after TNT explosions drops randomlyno

Miscellaneous

This group covers command blocks, command chains, debug information, minecart speed and TNT.

RuleTypeDefaultMeaningCheats
command_blocks_workBooleantruecommand blocks are active in the worldyes
global_sound_eventsBooleantruewither, dragon and portal sounds are heard by everyoneyes
max_block_modificationsInteger32768block limit for /clone, /fill and /fillbiomeyes
max_command_forksInteger65536maximum execution contexts per tickyes
max_command_sequence_lengthInteger65536maximum command chain length per tickyes
max_minecart_speedInteger8top speed a minecart may reach (experimental)yes
reduced_debug_infoBooleanfalsethe debug screen shows limited informationyes
tnt_explodesBooleantrueTNT explodes after being activatedno

Mobs

These rules control mob behaviour and limits: griefing, raids, monster spawning and entity cramming.

RuleTypeDefaultMeaningCheats
forgive_dead_playersBooleantrueangered mobs stop targeting a player who diedyes
max_entity_crammingInteger24pushable entities before damage occurs; 0 disables ityes
mob_griefingBooleantruemobs change blocks and pick up itemsyes
raidsBooleantrueraids are enabledyes
spawn_monstersBooleantruemonsters spawn naturallyyes
universal_angerBooleanfalseangered mobs attack any nearby playeryes

Setting max_entity_cramming=0 switches off cramming damage. Farms use this, but it can raise server load because entities then stack without limit. For more levers, see optimizing Minecraft server performance.

Player

The player rules cover damage, inventory, portals, respawning, sleeping, PvP and various movement checks.

RuleTypeDefaultMeaningCheats
allow_entering_nether_using_portalsBooleantruenether portals can be usedyes
drowning_damageBooleantrueplayers take drowning damageyes
elytra_movement_checkBooleantruethe server checks elytra flight speedyes
ender_pearls_vanish_on_deathBooleantruethrown ender pearls disappear when the thrower diesyes
fall_damageBooleantrueplayers take fall damageyes
fire_damageBooleantrueplayers take damage from fire and lavayes
fire_spread_radius_around_playerInteger128maximum distance fire spreads around a playeryes
freeze_damageBooleantrueplayers take damage in powder snowyes
immediate_respawnBooleanfalseplayers respawn instantly without the death screenno
keep_inventoryBooleanfalseplayers keep inventory and experience on deathyes
limited_craftingBooleanfalseplayers can only craft unlocked recipesyes
locator_barBooleantruethe player locator bar is enabledno
natural_health_regenerationBooleantrueplayers regenerate health naturallyno
player_movement_checkBooleantruethe server checks player movement speedyes
players_nether_portal_creative_delayInteger0portal transition delay in creative modeyes
players_nether_portal_default_delayInteger80portal transition delay outside creative modeyes
players_sleeping_percentageInteger100percentage of players who must sleep to skip the nightno
pvpBooleantrueplayers can damage each otheryes
respawn_radiusInteger10spread of the respawn point around world spawnno
spectators_generate_chunksBooleantruespectators generate new chunksyes

Spawning

These rules decide which natural spawns happen and whether spawner blocks work.

RuleTypeDefaultMeaningCheats
spawn_mobsBooleantruemobs spawn naturallyyes
spawn_patrolsBooleantruepatrols can spawnyes
spawn_phantomsBooleantruephantoms spawn at nightyes
spawn_wandering_tradersBooleantruewandering traders can spawnyes
spawn_wardensBooleantruewardens can spawnyes
spawner_blocks_workBooleantruemonster spawner blocks are activeyes
Info
spawn_mobs and spawn_monsters are two different game rules. spawn_mobs covers all mobs, spawn_monsters only monsters.

World updates

These rules affect time, weather, fluid sources, snow, vines and random world ticks.

RuleTypeDefaultMeaningCheats
advance_timeBooleantruethe daylight cycle and moon phases progressyes
advance_weatherBooleantrueweather changes on its ownyes
lava_source_conversionBooleanfalsenew lava sources can formyes
max_snow_accumulation_heightInteger1maximum snow layers per blockyes
random_tick_speedInteger3how often random ticks occur per chunkyes
spread_vinesBooleantruevines spread to other blocksyes
water_source_conversionBooleantruenew water sources can formyes

The rules you will actually use

The full list is the reference. Day to day on a server, a handful of game rules come up again and again.

Keeping your inventory on death

To let players keep their inventory and experience after dying, set keep_inventory to true:

/gamerule keep_inventory true

The default is false, and changing this rule requires cheats.

Stopping time and weather

advance_time=false freezes the daylight cycle and the moon phases:

/gamerule advance_time false

Weather changes are stopped separately:

/gamerule advance_weather false

Both default to true and need cheats enabled.

Skipping the night with fewer players

players_sleeping_percentage sets what share of players has to sleep before the night is skipped.

The default is 100. A lower value is particularly handy for multiplayer worlds, because the whole group no longer has to be asleep at the same time:

/gamerule players_sleeping_percentage 50

At 0, a single sleeper skips the night alone. This rule can be changed without cheats.

Turning PvP off

PvP is no longer controlled through server.properties but as a game rule. To disable it:

/gamerule pvp false

Set it back to true to let players damage each other again. The default is true and changing it requires cheats.

Preventing creeper and enderman damage

mob_griefing=false stops mobs from changing blocks and picking up items:

/gamerule mob_griefing false

This is the rule behind mob griefing in general. The default is true and the change requires cheats.

Speeding up plant growth, and what it costs

random_tick_speed sets how often random ticks occur per chunk. Those ticks drive plant growth, fire spread and block conversions, among other things.

The default is:

/gamerule random_tick_speed 3

A higher value speeds those processes up, but it puts a substantial load on the server.

Caution
random_tick_speed is the riskiest game rule for server performance. Do not raise it casually. There is more detail in optimizing Minecraft server performance.

Game rules or server.properties?

Game rules and server.properties do different jobs.

server.properties is read when the server starts and holds server-wide settings such as the port, the maximum player count or the view distance. For a full reference, see Minecraft server.properties explained.

Game rules, by contrast, belong to the individual world. They take effect immediately, survive restarts, and have to be set per world when you run several.

Four well-known values moved from the server configuration to game rules with snapshot 25w35a: allow_entering_nether_using_portals, command_blocks_work, pvp and spawn_monsters.

If you run Paper, additional configuration files come into play. Those are covered in Paper configuration explained.

Troubleshooting

ProblemLikely causeFix
Command is not recognisedoutdated camelCase name from an older guideuse the current snake_case name from Java Edition 26.2
"Unknown game rule"the rule no longer exists under that namecheck the spelling and the current rule name
No permissioncheats are not enabled for that rule, or the player lacks operator rightscheck cheats and operator status
The rule only applies in one worldgame rules are per worldset the rule separately in every world you want it in
Monsters keep spawningspawn_mobs and spawn_monsters were mixed updecide whether you mean all mobs or only monsters
The server stutters after a changerandom_tick_speed was set too highlower the value and check server load
pvp in server.properties has no effectpvp is a game rule todayuse /gamerule pvp false or true instead

Frequently asked questions

How do I keep my inventory after dying?

You keep your inventory and experience with keep_inventory=true. Use:

/gamerule keep_inventory true

Why does my game rule command no longer work?

Since Java Edition 26.2, an older command can fail purely because the rule name is outdated. Use the current snake_case spelling from the reference tables above.

How do I stop time in Minecraft?

You stop the daylight cycle with advance_time=false:

/gamerule advance_time false

What is the difference between spawn_mobs and spawn_monsters?

spawn_mobs governs the natural spawning of all mobs, while spawn_monsters only affects monsters. The two are not interchangeable.

How do I disable PvP on my Minecraft server?

You disable PvP with the pvp game rule set to false:

/gamerule pvp false

Do I need cheats to change game rules?

Most game rules require cheats to be enabled. The "Cheats" column in the tables above shows which ones can be changed without them.

Do game rules apply to the whole server or per world?

Game rules apply per world, not to the server as a whole. On a server with several worlds you have to set each rule in every world separately.

Last checked against the official Java Edition documentation, as of August 2026 (version 26.2).

Summary

Minecraft game rules change how a world behaves right away and survive restarts. Since version 26.2 the rules use snake_case, which is why older guides quoting the previous names no longer work reliably.

For most everyday needs, a handful of commands is enough: keep_inventory for what happens on death, pvp for player damage, players_sleeping_percentage for multiplayer worlds, and advance_time and advance_weather for time and weather. Be careful with random_tick_speed — that one has a real cost in server load.

If you would rather not run the machine yourself, you can rent a Minecraft server instead.