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.
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 trueIn the dashboard console
gamerule keep_inventory trueDo not type square brackets. They just represent options in the syntax. Use gamerule locator_bar false, for example.
How to set up a gamerule
- 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.
- 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.
- 03
Check the current value
Run gamerule followed by the rule name, without entering a value, to check the current configuration.
- 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.
- 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.
| Objective | Current Java | old Java | Bedrock |
|---|---|---|---|
| Maintain inventory | keep_inventory | keepInventory | keepinventory |
| Cycle of the day | advance_time | doDaylightCycle | dodaylightcycle |
| Natural mobs | spawn_mobs | doMobSpawning | domobspawning |
| Death messages | show_death_messages | showDeathMessages | showdeathmessages |
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 controls | Java | Bedrock | Value |
|---|---|---|---|
| Maintain inventory and experience after dying | keep_inventory | keepinventory | true or false |
| Allow damage between players (PvP) | pvp | pvp | true or false |
| Regenerate life naturally | natural_health_regeneration | naturalregeneration | true or false |
| Activate fall damage | fall_damage | falldamage | true or false |
| Activate fire and lava damage | fire_damage | firedamage | true or false |
| Activate drown damage | drowning_damage | drowningdamage | true or false |
| Activate freeze damage | freeze_damage | freezedamage | true or false |
| Respawn without showing the death screen | immediate_respawn | doimmediaterespawn | true or false |
| Percentage of players needed to sleep | players_sleeping_percentage | playerssleepingpercentage | number |
| Random respawn radius at spawn | respawn_radius | spawnradius | number |
| Display the locator bar | locator_bar | locatorbar | true or false |
World, weather and climate
| What controls | Java | Bedrock | Value |
|---|---|---|---|
| Keep the day and night cycle moving | advance_time | dodaylightcycle | true or false |
| Allow natural changes in climate | advance_weather | doweathercycle | true or false |
| Growth speed and random ticks | random_tick_speed | randomtickspeed | number |
| Allow vines to spread | spread_vines | Não disponível | true or false |
| Allow infinite new sources of water | water_source_conversion | Não disponível | true or false |
| Allow new lava sources | lava_source_conversion | Não disponível | true or false |
| Distance over which fire can spread | fire_spread_radius_around_player | Use dofiretick | number |
| Display coordinates on screen | Não disponível | showcoordinates | true or false |
| Display day count on screen | Não disponível | showdaysplayed | true or false |
Mobs, creatures and generation
| What controls | Java | Bedrock | Value |
|---|---|---|---|
| Allow block changes caused by mobs | mob_griefing | mobgriefing | true or false |
| Allow natural mob generation | spawn_mobs | domobspawning | true or false |
| Allow natural monster generation | spawn_monsters | Use domobspawning | true or false |
| Allow generation of phantoms | spawn_phantoms | doinsomnia | true or false |
| Allow generation of patrols | spawn_patrols | Não disponível | true or false |
| Allow generation of traveling merchants | spawn_wandering_traders | Não disponível | true or false |
| Allow generation of wardens | spawn_wardens | Não disponível | true or false |
| Forgiving enraged creatures after death | forgive_dead_players | Não disponível | true or false |
| Make neutral creatures attack nearby players | universal_anger | Não disponível | true or false |
| Limit of entities crammed into the same block | max_entity_cramming | Não disponível | number |
Drops and explosions
| What controls | Java | Bedrock | Value |
|---|---|---|---|
| Allow block drops | block_drops | dotiledrops | true or false |
| Allow drops from mobs and experience | mob_drops | domobloot | true or false |
| Allow drops from other entities | entity_drops | doentitydrops | true or false |
| Apply drop reduction to mob explosions | mob_explosion_drop_decay | Não disponível | true or false |
| Apply drop reduction to TNT explosions | tnt_explosion_drop_decay | tntexplosiondropdecay | true or false |
| Allow projectiles to break compatible blocks | projectiles_can_break_blocks | projectilescanbreakblocks | true or false |
| Allow activated TNT explosion | tnt_explodes | tntexplodes | true or false |
| Blow up bed or anchor in wrong dimension | Não disponível | respawnblocksexplode | true or false |
Chat, commands and interface
| What controls | Java | Bedrock | Value |
|---|---|---|---|
| Show command block output | command_block_output | commandblockoutput | true or false |
| Show return of executed commands | send_command_feedback | sendcommandfeedback | true or false |
| View death messages | show_death_messages | showdeathmessages | true or false |
| Announce advancements in chat | show_advancement_messages | Não disponível | true or false |
| Log administrative commands | log_admin_commands | Não disponível | true or false |
| Activate the operation of command blocks | command_blocks_work | commandblocksenabled | true or false |
| View unlocked recipe messages | Não disponível | showrecipemessages | true or false |
| Display put and break restrictions on items | Não disponível | showtags | true 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 falseCreative map with fixed time
gamerule advance_time false
gamerule advance_weather false
gamerule spawn_mobs false
gamerule fire_spread_radius_around_player 0Events with silent commands
gamerule command_block_output false
gamerule send_command_feedback false
gamerule show_death_messages false
gamerule immediate_respawn trueCare 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.
