Guides

Minecraft Java and Bedrock gamerules: list and commands

Practical list of Minecraft Java Edition and Bedrock Edition gamerules: /gamerule syntax, new snake_case names (1.21.11+), camelCase equivalents, exclusive rules and ready packs for SMP, creative and events.

Samuel AkiresCEO RoxyCloud
3 min read536 words
Minecraft Java and Bedrock gamerules: list and commands

In RoxyCloud, open your server Console, enter the command without / and press Enter. Java 1.21.11 uses names such as gamerule minecraft:keep_inventory true. The Java table below uses that version; earlier releases use different names. Check the edition before copying.

Gamerules adjust inventory on death, mob griefing, the day cycle, spawn and PvP with /gamerule, without plugins. This guide covers Java Edition and Bedrock in 2026, including the Java 1.21.11+ name change.

How to use /gamerule

Syntax
/gamerule <rule_name>           # query
/gamerule <rule_name> <value>   # set

They apply per world (they do not reset on restart), need OP/cheats/console and names change between editions. On Paper or Purpur, it works like vanilla.

  1. Java: panel console or chat with OP 2+. Confirm if it is 1.21.11+ (snake_case) or older (camelCase).
  2. Bedrock: cheats on or console. Lowercase names; in the console, often without /.
  3. Test with /gamerule <name> with no value to confirm the rule exists in that version.

Java rename (camelCase → snake_case)

Before (≤ 1.21.10)Now (1.21.11+)What it does
keepInventorykeep_inventoryKeeps inventory and XP on death
doDaylightCycleadvance_timeDay/night cycle
doWeatherCycleadvance_weatherNatural weather change
doMobSpawningspawn_mobsNatural mob spawn
mobGriefingmob_griefingMobs change blocks / pick up items
naturalRegenerationnatural_health_regenerationHunger regeneration
doImmediateRespawnimmediate_respawnRespawn without the death screen
playersSleepingPercentageplayers_sleeping_percentage% to skip the night
randomTickSpeedrandom_tick_speedRandom tick speed
disableRaidsraids (inverted)true = raids active

Essential gamerules

Java (1.21.11+)BedrockDefaultTypical use
keep_inventory (keepInventory)keepinventoryfalseCasual SMP
mob_griefing (mobGriefing)mobgriefingtruefalse = protects builds
advance_time (doDaylightCycle)dodaylightcycletruefalse = fixed day
spawn_mobs (doMobSpawning)domobspawningtruefalse = adventure without spawn
players_sleeping_percentageplayerssleepingpercentage100e.g. 50 = half sleep
random_tick_speedrandomtickspeed3 (JE) / 1 (BE)farms (CPU cost)
pvppvptruefalse = peaceful SMP
Examples (Java 1.21.11+ / older / Bedrock)
# Java 1.21.11+
/gamerule minecraft:keep_inventory true
/gamerule minecraft:mob_griefing false
/gamerule minecraft:advance_time false
/time set day

# Java ≤ 1.21.10
/gamerule keepInventory true
/gamerule mobGriefing false

# Bedrock
/gamerule keepinventory true
/gamerule mobgriefing false

Bedrock exclusives

Bedrock ruleDefaultWhat it is for
showcoordinatestrueShows XYZ on the HUD
dofireticktrueFire spreads naturally
recipesunlocktrueRecipes need to be unlocked
respawnblocksexplodetrueBed/anchor explode outside the dimension

Ready packs

SMP with friends
/gamerule minecraft:keep_inventory true
/gamerule minecraft:mob_griefing false
/gamerule minecraft:players_sleeping_percentage 50
Event / lobby
/gamerule minecraft:advance_time false
/gamerule minecraft:advance_weather false
/gamerule minecraft:spawn_mobs false
/gamerule minecraft:mob_griefing false
/gamerule minecraft:immediate_respawn true
/time set noon

Cautions and myths

  • spawn_mobs false does not disable spawners, eggs or /summon.
  • mob_griefing false does not make creepers harmless to players.
  • A high random_tick_speed drops TPS. Combine it with performance practices.
  • On proxy networks, apply gamerules on each backend world.

On Java 1.21.11+, use snake_case (keep_inventory, advance_time). On Bedrock, lowercase (keepinventory, showcoordinates). Set up the server, apply the pack and adjust from the panel console.

Frequently asked questions

Straight answers before you order

Syntax: /gamerule <name> <value>. Without a value, it shows the current one. On a Java server, use the panel console or chat with OP 2+. On Bedrock, enable cheats or use the console (often without the leading slash).

On Java 1.21.11+, the name became keep_inventory (optionally minecraft:keep_inventory). On older versions, use keepInventory. Check the server version before copying.

Modern Java uses snake_case; Bedrock uses lowercase without underscores (keepinventory, dodaylightcycle). Some rules exist only on Java (raids, spawn_wardens) and only on Bedrock (showcoordinates, dofiretick).

Java 1.21.11+: /gamerule minecraft:advance_time false. Older Java: /gamerule doDaylightCycle false. Bedrock: /gamerule dodaylightcycle false. Then use /time set day.

No. With mob_griefing false, creepers stop destroying blocks, but damage to players continues. It is build protection, not PvE protection.

Yes. High values increase random ticks and CPU use. Default: 3 on Java, 1 on Bedrock. On SMP, avoid extreme numbers.