Return to blog
MinecraftGamerules MinecraftMinecraft JavaMinecraft BedrockMinecraft Commands

Gamerules on Minecraft Java and Bedrock: list and commands

Find the right gamerule to control inventory, PvP, mobs, weather, drops and commands, with the correct names for Minecraft Java and Bedrock.

Published in Matheus Henrique10 min reading

Quick Summary

How to use the gamerule command

Gamerules change the world's behavior and are saved after restart. Inside the game, use the bar; in the dashboard console, send the command without the slash.

Through chat, your account must have permission to execute commands. On a dedicated server, you can use an account with OP or send the gamerule directly from the console.

In game chat

/gamerule keep_inventory true

In the dashboard console

gamerule keep_inventory true

Do not type square brackets. They just represent options in the syntax. Use gamerule locator_bar false, for example.

How to set up a gamerule

  1. 01

    Confirm edition and version

    Find out if the server uses Minecraft Java or Bedrock and check the version, as the names of several gamerules are different.

  2. 02

    Open chat or console

    In the game, use the command with a slash at the beginning. In the dashboard console, type the same command without the slash.

  3. 03

    Check the current value

    Run gamerule followed by the rule name, without entering a value, to check the current configuration.

  4. 04

    Apply true, false or a number

    Use a value accepted by the rule. Real commands do not need the square brackets shown in syntax documentations.

  5. 05

    Test before releasing the server

    Enter the world and confirm the result, especially when changing drops, inventory, mob generation or tick speed.

To list the rules accepted by your installation, type /gamerule and use autocomplete. This is especially useful on older servers, forks, and versions with naming changes.

Java 1.21.11, old versions and Bedrock

Starting with Java 1.21.11, gamerules migrated from camelCase names to snake_case identifiers. So an old tutorial might show keepInventory, while the current version uses keep_inventory. In Bedrock, the equivalent remains as keepinventory.

ObjectiveCurrent Javaold JavaBedrock
Maintain inventorykeep_inventorykeepInventorykeepinventory
Cycle of the dayadvance_timedoDaylightCycledodaylightcycle
Natural mobsspawn_mobsdoMobSpawningdomobspawning
Death messagesshow_death_messagesshowDeathMessagesshowdeathmessages

List of gamerules for Java and Bedrock

The names in the Java column consider the current naming in snake_case. When “Not available” appears, use another equivalent rule or confirm the options offered by your edition.

Players and survival

What controlsJavaBedrockValue
Maintain inventory and experience after dyingkeep_inventorykeepinventorytrue or false
Allow damage between players (PvP)pvppvptrue or false
Regenerate life naturallynatural_health_regenerationnaturalregenerationtrue or false
Activate fall damagefall_damagefalldamagetrue or false
Activate fire and lava damagefire_damagefiredamagetrue or false
Activate drown damagedrowning_damagedrowningdamagetrue or false
Activate freeze damagefreeze_damagefreezedamagetrue or false
Respawn without showing the death screenimmediate_respawndoimmediaterespawntrue or false
Percentage of players needed to sleepplayers_sleeping_percentageplayerssleepingpercentagenumber
Random respawn radius at spawnrespawn_radiusspawnradiusnumber
Display the locator barlocator_barlocatorbartrue or false

World, weather and climate

What controlsJavaBedrockValue
Keep the day and night cycle movingadvance_timedodaylightcycletrue or false
Allow natural changes in climateadvance_weatherdoweathercycletrue or false
Growth speed and random ticksrandom_tick_speedrandomtickspeednumber
Allow vines to spreadspread_vinesNão disponíveltrue or false
Allow infinite new sources of waterwater_source_conversionNão disponíveltrue or false
Allow new lava sourceslava_source_conversionNão disponíveltrue or false
Distance over which fire can spreadfire_spread_radius_around_playerUse dofireticknumber
Display coordinates on screenNão disponívelshowcoordinatestrue or false
Display day count on screenNão disponívelshowdaysplayedtrue or false

Mobs, creatures and generation

What controlsJavaBedrockValue
Allow block changes caused by mobsmob_griefingmobgriefingtrue or false
Allow natural mob generationspawn_mobsdomobspawningtrue or false
Allow natural monster generationspawn_monstersUse domobspawningtrue or false
Allow generation of phantomsspawn_phantomsdoinsomniatrue or false
Allow generation of patrolsspawn_patrolsNão disponíveltrue or false
Allow generation of traveling merchantsspawn_wandering_tradersNão disponíveltrue or false
Allow generation of wardensspawn_wardensNão disponíveltrue or false
Forgiving enraged creatures after deathforgive_dead_playersNão disponíveltrue or false
Make neutral creatures attack nearby playersuniversal_angerNão disponíveltrue or false
Limit of entities crammed into the same blockmax_entity_crammingNão disponívelnumber

Drops and explosions

What controlsJavaBedrockValue
Allow block dropsblock_dropsdotiledropstrue or false
Allow drops from mobs and experiencemob_dropsdomobloottrue or false
Allow drops from other entitiesentity_dropsdoentitydropstrue or false
Apply drop reduction to mob explosionsmob_explosion_drop_decayNão disponíveltrue or false
Apply drop reduction to TNT explosionstnt_explosion_drop_decaytntexplosiondropdecaytrue or false
Allow projectiles to break compatible blocksprojectiles_can_break_blocksprojectilescanbreakblockstrue or false
Allow activated TNT explosiontnt_explodestntexplodestrue or false
Blow up bed or anchor in wrong dimensionNão disponívelrespawnblocksexplodetrue or false

Chat, commands and interface

What controlsJavaBedrockValue
Show command block outputcommand_block_outputcommandblockoutputtrue or false
Show return of executed commandssend_command_feedbacksendcommandfeedbacktrue or false
View death messagesshow_death_messagesshowdeathmessagestrue or false
Announce advancements in chatshow_advancement_messagesNão disponíveltrue or false
Log administrative commandslog_admin_commandsNão disponíveltrue or false
Activate the operation of command blockscommand_blocks_workcommandblocksenabledtrue or false
View unlocked recipe messagesNão disponívelshowrecipemessagestrue or false
Display put and break restrictions on itemsNão disponívelshowtagstrue or false

Bonus: ready-made settings

The examples below use names from Java 1.21.11 or newer and are written for the console, without a leading slash. Apply only the rules compatible with the proposal of your world.

Friendly survival

gamerule keep_inventory true
gamerule players_sleeping_percentage 25
gamerule mob_griefing false
gamerule locator_bar false

Creative map with fixed time

gamerule advance_time false
gamerule advance_weather false
gamerule spawn_mobs false
gamerule fire_spread_radius_around_player 0

Events with silent commands

gamerule command_block_output false
gamerule send_command_feedback false
gamerule show_death_messages false
gamerule immediate_respawn true

Care before changing

  • Back up: Disabling drops or changing world rules may cause item loss or unexpected changes.
  • Avoid high random_tick_speed: Exaggerated values can generate lag and speed up processes that are difficult to reverse.
  • Confirm each world: Multi-world plugins can maintain independent rules per world or dimension.
  • Use autocomplete: it shows the names actually accepted by your version and avoids copying a rule from another edition.

GameRules FAQ

What is the difference between Java and Bedrock game rules?

The two editions have several equivalent rules, but use different names. In Java 1.21.11 or later, names were moved to snake_case; in Bedrock, they normally appear in lowercase letters and without separators.

Do I need to use square brackets in the gamerule command?

No. Brackets are only used to indicate possible values in documentation. An actual command would be gamerule locator_bar false on the console or /gamerule locator_bar false within the game.

Why does it appear that the gamerule does not exist?

Usually the name belongs to another edition or does not correspond to the installed version. Use game autocomplete and confirm the server is Java or Bedrock.

Are gamerules maintained after the server restarts?

Yes. They stay safe in the world. On servers with multiple worlds or dimensions managed by plugins, confirm whether the rule needs to be applied separately to each world.

Can increasing randomTickSpeed cause lag?

It can. High values ​​speed up crops, leaves and other random ticks, increasing server work. Back up and scale up little by little while monitoring performance.

Gamerule applied

After running the command, query the rule again and test within the world. To manage files, console, and backups in one place, go to BedHosting panel.