News
Game
Guides
Downloads
Versions
Best game rules to change in Minecraft
COMMANDSCOPY & PASTEJAVA 26.3

Best game rules to change in Minecraft

Game rules change how a world behaves, from what you keep after death to how many players must sleep to skip the night. These are the rules most worth changing in survival or on a server, with values the game accepts.

Before you pasteCheats must be on. Commands longer than 256 characters only work in a command block.

The commands

Keep your items after death

/gamerule keep_inventory true

Your inventory and experience stay with you when you die.

Java 26.3 29 characters · chat OK

Stop creepers from blowing up blocks

/gamerule mob_griefing false

Mobs can no longer destroy blocks; endermen stop moving them too.

Java 26.3 28 characters · chat OK

Skip the night with half the players

/gamerule players_sleeping_percentage 50

Half of the online players in bed is enough to skip to morning.

Java 26.3 40 characters · chat OK

Turn off phantoms

/gamerule spawn_phantoms false

Phantoms no longer spawn, even if you have not slept for days.

Java 26.3 30 characters · chat OK

Respawn instantly

/gamerule immediate_respawn true

Skips the death screen and puts you straight back at your spawn point.

Java 26.3 32 characters · chat OK

Turn off player combat

/gamerule pvp false

Players can no longer hurt each other, ideal for a peaceful server.

Java 26.3 19 characters · chat OK

Hide the locator bar

/gamerule locator_bar false

Removes the bar that shows where other players are.

Java 26.3 27 characters · chat OK

Turn off raids

/gamerule raids false

Bad Omen no longer starts a raid when you enter a village.

Java 26.3 21 characters · chat OK

Grow crops faster

/gamerule random_tick_speed 6

Doubles random ticks: crops, saplings and grass grow faster.

Java 26.3 29 characters · chat OK

Stop fire from spreading

/gamerule fire_spread_radius_around_player 0

Fire no longer spreads to nearby blocks, a safety net for wooden builds.

Java 26.3 44 characters · chat OK

Lighter spectators on servers

/gamerule spectators_generate_chunks false

Players in Spectator mode no longer generate new terrain.

Java 26.3 42 characters · chat OK

Hardcore healing

/gamerule natural_health_regeneration false

Health no longer regenerates from a full food bar; potions and golden apples still heal.

Java 26.3 43 characters · chat OK

How to change a rule

Type /gamerule followed by the rule and a value, as in the list. Without a value, the game tells you the current setting: Game rule keep_inventory is currently set to false. Rules belong to the world, so on a server one change applies to every player. You need cheats on or operator level 2.

Tips

  • Change one rule at a time and test it, especially on a shared server.
  • random_tick_speed speeds up crops, but also leaf decay and fire; keep it modest.
  • players_sleeping_percentage takes a percentage of the online players.

Common errors

Rule names now use lowercase words joined by underscores. The old forms like keepInventory are no longer accepted and give an error. Booleans only take true or false. Want to remove phantoms without a rule? Sleeping regularly does the job too; see the Phantom page.

✓ Checked in Java Edition 26.3 · updated 2 November 2026

FAQ

Do game rules apply to all my worlds?

No. Each world keeps its own rules. Set them again in every world, or pick them in the Game Rules screen when you create a new one.

How do I check the value of a rule?

Type /gamerule followed by the rule name only, for example /gamerule keep_inventory. The game replies with the current value.

Commands used on this page

/gameruleRead or change the game rules of a world