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.

What you will learn
- why older Minecraft game rule commands stopped working with 26.2
- how the current
/gamerulecommand 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
- The /gamerule command
- Every game rule at a glance
- The rules you will actually use
- Game rules or server.properties?
- Troubleshooting
- Frequently asked questions
- Related articles
- Summary
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 rule | Replaces the former entry |
|---|---|
allow_entering_nether_using_portals | allow-nether |
command_blocks_work | enable-command-block |
pvp | pvp |
spawn_monsters | spawn-monsters |
Writing those values into server.properties achieves nothing today. For the current state of that file, see Minecraft server.properties explained.
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.
| Rule | Type | Default | Meaning | Cheats |
|---|---|---|---|---|
command_block_output | Boolean | true | command blocks notify admins | yes |
log_admin_commands | Boolean | true | log admin commands to the server log | yes |
send_command_feedback | Boolean | true | show command feedback in chat | yes |
show_advancement_messages | Boolean | true | announce advancements in chat | yes |
show_death_messages | Boolean | true | show death messages in chat | no |
Drops
These rules affect whether blocks, mobs and other entities leave loot, and how explosions interact with drops.
| Rule | Type | Default | Meaning | Cheats |
|---|---|---|---|---|
block_drops | Boolean | true | blocks leave items when broken | no |
block_explosion_drop_decay | Boolean | true | block loot drops randomly based on distance from the explosion | yes |
entity_drops | Boolean | true | non-mob entities leave items | yes |
mob_drops | Boolean | true | mobs drop items and experience orbs | no |
mob_explosion_drop_decay | Boolean | true | block loot after mob explosions drops randomly | yes |
projectiles_can_break_blocks | Boolean | true | projectiles destroy destructible blocks | no |
tnt_explosion_drop_decay | Boolean | false | block loot after TNT explosions drops randomly | no |
Miscellaneous
This group covers command blocks, command chains, debug information, minecart speed and TNT.
| Rule | Type | Default | Meaning | Cheats |
|---|---|---|---|---|
command_blocks_work | Boolean | true | command blocks are active in the world | yes |
global_sound_events | Boolean | true | wither, dragon and portal sounds are heard by everyone | yes |
max_block_modifications | Integer | 32768 | block limit for /clone, /fill and /fillbiome | yes |
max_command_forks | Integer | 65536 | maximum execution contexts per tick | yes |
max_command_sequence_length | Integer | 65536 | maximum command chain length per tick | yes |
max_minecart_speed | Integer | 8 | top speed a minecart may reach (experimental) | yes |
reduced_debug_info | Boolean | false | the debug screen shows limited information | yes |
tnt_explodes | Boolean | true | TNT explodes after being activated | no |
Mobs
These rules control mob behaviour and limits: griefing, raids, monster spawning and entity cramming.
| Rule | Type | Default | Meaning | Cheats |
|---|---|---|---|---|
forgive_dead_players | Boolean | true | angered mobs stop targeting a player who died | yes |
max_entity_cramming | Integer | 24 | pushable entities before damage occurs; 0 disables it | yes |
mob_griefing | Boolean | true | mobs change blocks and pick up items | yes |
raids | Boolean | true | raids are enabled | yes |
spawn_monsters | Boolean | true | monsters spawn naturally | yes |
universal_anger | Boolean | false | angered mobs attack any nearby player | yes |
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.
| Rule | Type | Default | Meaning | Cheats |
|---|---|---|---|---|
allow_entering_nether_using_portals | Boolean | true | nether portals can be used | yes |
drowning_damage | Boolean | true | players take drowning damage | yes |
elytra_movement_check | Boolean | true | the server checks elytra flight speed | yes |
ender_pearls_vanish_on_death | Boolean | true | thrown ender pearls disappear when the thrower dies | yes |
fall_damage | Boolean | true | players take fall damage | yes |
fire_damage | Boolean | true | players take damage from fire and lava | yes |
fire_spread_radius_around_player | Integer | 128 | maximum distance fire spreads around a player | yes |
freeze_damage | Boolean | true | players take damage in powder snow | yes |
immediate_respawn | Boolean | false | players respawn instantly without the death screen | no |
keep_inventory | Boolean | false | players keep inventory and experience on death | yes |
limited_crafting | Boolean | false | players can only craft unlocked recipes | yes |
locator_bar | Boolean | true | the player locator bar is enabled | no |
natural_health_regeneration | Boolean | true | players regenerate health naturally | no |
player_movement_check | Boolean | true | the server checks player movement speed | yes |
players_nether_portal_creative_delay | Integer | 0 | portal transition delay in creative mode | yes |
players_nether_portal_default_delay | Integer | 80 | portal transition delay outside creative mode | yes |
players_sleeping_percentage | Integer | 100 | percentage of players who must sleep to skip the night | no |
pvp | Boolean | true | players can damage each other | yes |
respawn_radius | Integer | 10 | spread of the respawn point around world spawn | no |
spectators_generate_chunks | Boolean | true | spectators generate new chunks | yes |
Spawning
These rules decide which natural spawns happen and whether spawner blocks work.
| Rule | Type | Default | Meaning | Cheats |
|---|---|---|---|---|
spawn_mobs | Boolean | true | mobs spawn naturally | yes |
spawn_patrols | Boolean | true | patrols can spawn | yes |
spawn_phantoms | Boolean | true | phantoms spawn at night | yes |
spawn_wandering_traders | Boolean | true | wandering traders can spawn | yes |
spawn_wardens | Boolean | true | wardens can spawn | yes |
spawner_blocks_work | Boolean | true | monster spawner blocks are active | yes |
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.
| Rule | Type | Default | Meaning | Cheats |
|---|---|---|---|---|
advance_time | Boolean | true | the daylight cycle and moon phases progress | yes |
advance_weather | Boolean | true | weather changes on its own | yes |
lava_source_conversion | Boolean | false | new lava sources can form | yes |
max_snow_accumulation_height | Integer | 1 | maximum snow layers per block | yes |
random_tick_speed | Integer | 3 | how often random ticks occur per chunk | yes |
spread_vines | Boolean | true | vines spread to other blocks | yes |
water_source_conversion | Boolean | true | new water sources can form | yes |
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.
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
| Problem | Likely cause | Fix |
|---|---|---|
| Command is not recognised | outdated camelCase name from an older guide | use the current snake_case name from Java Edition 26.2 |
| "Unknown game rule" | the rule no longer exists under that name | check the spelling and the current rule name |
| No permission | cheats are not enabled for that rule, or the player lacks operator rights | check cheats and operator status |
| The rule only applies in one world | game rules are per world | set the rule separately in every world you want it in |
| Monsters keep spawning | spawn_mobs and spawn_monsters were mixed up | decide whether you mean all mobs or only monsters |
| The server stutters after a change | random_tick_speed was set too high | lower the value and check server load |
pvp in server.properties has no effect | pvp is a game rule today | use /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.
Related articles
- How to create a Minecraft server
- Minecraft server.properties explained
- Optimizing Minecraft server performance
- Paper configuration explained
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.