Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
You can change a Minecraft gamerule either in the world-settings interface or with the /gamerule command. In chat, a command block, a function, a behavior pack, or an authorized server console, use /gamerule <rule> <value> to set a rule; omit the value to query its current state. Boolean rules use true or false, while integer rules require a whole number.
The exact spelling, capitalization, available rules, menu location, and permission requirements depend on whether you are playing Java Edition or Bedrock Edition and on the game version. Java rule names are case-sensitive; Bedrock uses the lowercase names shown by its autocomplete. Check the suggested command before pressing Enter, especially on a shared server.
What is a Minecraft gamerule?
A gamerule is a world-level setting that controls a specific behavior, such as whether players keep items after dying, whether mobs can alter blocks, or whether the daylight cycle advances. Gamerules are different from ordinary video or control settings: they change how the world behaves for everyone who plays that world.
Microsoft describes /gamerule as a command that lets you adjust certain features of a game world and turn them on or off. The command can be run interactively by a player, automatically from a command block or function, or administratively from a dedicated-server console when that execution context has the required authority.
Popular on Amazon
- Play and share with friends on console, mobile and Windows 10
- discover community creations in the new in-game store
- access new mini games and game modes through servers
Rule names and defaults can change between editions and versions. Treat the command suggestions in your current game as the final spelling authority rather than copying an old list from a different edition.
How do I change a gamerule with a command?
Use this sequence whenever you need to inspect or change a rule.
- Identify the edition. Confirm whether the world is running Java Edition or Bedrock Edition. The two editions do not expose exactly the same rules or argument notation.
- Find the exact rule name. Type
/gameruleand use autocomplete. Java names use their documented capitalization and are case-sensitive. Bedrock presents lowercase names in its command suggestions. - Confirm permission. In Java, your account generally needs the permission level required for commands. In Bedrock, a player-issued command usually requires cheats to be enabled; an operator, server console, script, function, or behavior-pack execution context can follow different permission rules.
- Query the current value first. Enter the rule name without a value, for example
/gamerule keepInventoryin Java. The command returns the current setting without changing it. - Set the value. Add
trueorfalsefor a Boolean rule, or an integer for a numeric rule. For example, Java accepts/gamerule keepInventory trueand/gamerule mobGriefing false. - Verify the result. Run the query form again. If the response shows the new value, the rule was accepted in that world and execution context.
The general Java form is /gamerule <rule name> [<value>]. Bedrock documents separate forms for Boolean and integer rules: /gamerule <rule: BoolGameRule> [value: Boolean] and /gamerule <rule: IntGameRule> [value: int]. Square brackets indicate that the value can be omitted for a query.
What is different about gamerules in Java and Bedrock?
The purpose is similar in both editions, but command spelling, available rules, menus, and permissions differ.
| Area | Java Edition | Bedrock Edition |
|---|---|---|
| Command syntax | /gamerule <rule name> [<value>] |
/gamerule <rule: BoolGameRule> [value: Boolean] or /gamerule <rule: IntGameRule> [value: int] |
| Rule-name casing | Names are case-sensitive; use the documented spelling, such as keepInventory. |
Use the lowercase name supplied by Bedrock autocomplete, such as keepinventory when that is what the current version suggests. |
| Boolean values | true or false |
true or false |
| Integer values | Use a whole-number value for rules that accept integers, such as randomTickSpeed. |
Use a whole-number value for the documented integer-rule set, such as randomtickspeed or spawnradius when autocomplete offers them. |
| World-settings interface | Edit Game Rules is available during world creation and in World Options. | Many rules appear in Create New World, Edit World, and pause-menu settings. Rules absent from those screens require commands or the Bedrock Editor export interface. |
| Permission behavior | Commands require the appropriate permission level for the player or execution context. | Many player-entered commands require cheats. Enabling cheats in a world permanently disables achievements for that world according to the command documentation; server and script execution can follow different rules. |
A command copied from one edition may fail in the other even when the rule has the same purpose. If autocomplete rejects a name or changes its capitalization, use the accepted form shown in your installation.
Can I change gamerules from the world settings menu?
Yes, when the particular rule is exposed by your edition’s interface. Menus are useful when you want a visual checklist and do not want to enable or type commands, but they do not contain every gamerule.
Free tools Windows power users keep installed
One-click scans. No signup required.
Also popular on Amazon
Java Edition
During world creation, open the world options and choose Edit Game Rules. For an existing world, open its save selection, choose the world-options control, and use the same Edit Game Rules screen. Toggle the available settings, then load the world. A rule that is not listed must be changed with /gamerule or through the appropriate server or data-pack mechanism.
Bedrock Edition
Open Create New World for a new save or Edit World for an existing one. Bedrock also exposes many gamerules in the pause-menu settings while you are playing. The exact list depends on the current version and world type. If a rule is not visible, use the command with the lowercase autocomplete name; Bedrock Editor users can also use its export interface where applicable.
Changing a setting in a menu and changing it with a command updates the same world-level rule. The menu does not remove the need for permission checks on a server.
Which values can a gamerule accept?
Every rule has a defined value type. Supplying the wrong type causes the command to fail instead of silently converting your input.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesBoolean rules
Boolean rules have two states and accept only true or false. Examples include keepInventory, mobGriefing, doDaylightCycle, and doWeatherCycle in Java’s spelling. Do not add quotation marks around the value.
Integer rules
Integer rules require a whole number, not a decimal or a word. Examples in Bedrock’s documented integer set include randomtickspeed, spawnradius, playerssleepingpercentage, functioncommandlimit, and maxcommandchainlength. Java also has integer-valued rules, including its case-sensitive randomTickSpeed spelling. Use autocomplete to confirm that a rule exists and to see the exact accepted form in your version.
Also popular on Amazon
Queries
Leaving out the value is the query operation: /gamerule <rule>. This is safer than guessing the previous state and is especially important before changing a shared survival world.
What commands are commonly used?
The examples below use the Java capitalization supplied in the command documentation. On Bedrock, type the command prefix and select the lowercase spelling offered by autocomplete.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
How do I keep items after death?
Run /gamerule keepInventory true. To restore the normal drop behavior, run /gamerule keepInventory false. Query /gamerule keepInventory first if you are unsure which state the world currently uses.
How do I stop mobs from changing blocks?
Run /gamerule mobGriefing false. This controls the gamerule’s mob-griefing behavior; it does not grant or remove player building permission. Set it back with /gamerule mobGriefing true.
How do I freeze the time of day?
Run /gamerule doDaylightCycle false. The current in-game time remains at its present point while the cycle is disabled. Re-enable progression with /gamerule doDaylightCycle true.
How do I stop automatic weather changes?
Run /gamerule doWeatherCycle false to prevent the weather cycle from changing automatically. Use /gamerule doWeatherCycle true when you want normal weather cycling again.
Also popular on Amazon
- Play and share with friends on console, mobile and Windows 10
- discover community creations in the new in-game store
- access new mini games and game modes through servers
How do I change random tick speed?
Supply an integer, for example /gamerule randomTickSpeed 10 in Java when that rule is available. Bedrock uses the edition’s accepted lowercase form and integer syntax. Because tick speed is numeric and version-sensitive, select the rule from autocomplete and enter a whole number rather than copying capitalization from the other edition.
How do I silence command-block output in Bedrock?
In Bedrock, use /gamerule commandblockoutput false when the current autocomplete list includes that rule. This suppresses command-block output messages; it does not disable command blocks themselves. Set it to true to show the output again.
Do I need cheats, operator status, or a server console?
Permission is determined by where the command runs, not only by the text of the command.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Single-player Java: Your world must allow commands for the current session, and your player must have the required command permission. A temporary allowance for a session is different from permanently changing the save’s game mode or settings.
- Single-player Bedrock: Many commands entered by a player require cheats. Enabling cheats in that world permanently prevents achievements there, as stated in the command documentation.
- Multiplayer server: An operator or administrator must grant the needed permission, or the command can be entered in the dedicated-server console. Confirm the server’s edition and version before using a command copied from another installation.
- Command blocks, functions, and packs: These are supported execution contexts, but the block, function, or pack still operates under the permissions and rules of that world or server.
If you administer a shared world, tell players which edition and version the server uses, and test a rule in a copy before applying it to the live save. Bedrock achievement consequences make the cheat setting especially important for a survival world where achievements matter.
Why did my gamerule command fail?
Most failures come from an edition mismatch, a spelling error, or insufficient permission. Work through these checks in order.
- “Unknown or incomplete command”: Type
/gameruleand use autocomplete. You may have used a Java camel-case name on Bedrock, or a Bedrock lowercase name on Java. - “You do not have permission”: Ask the world owner for the required permission or operator status. On Bedrock, check whether cheats are enabled for player-issued commands.
- The command accepts the rule but rejects the value: Check the type. Boolean rules need exactly
trueorfalse; integer rules need a whole number. - The rule is missing from the menu: Not every rule is exposed in the graphical settings. Use the command form, or the applicable Bedrock Editor export interface.
- The command changed a different world: Verify that you are connected to the intended save or server before querying again. A query without a value confirms the state of the world that actually received the command.
- A copied command behaves differently after an update: Recheck the current edition reference and autocomplete. Gamerule names, defaults, and availability are version-sensitive.
How should I change gamerules on a shared world?
Make changes deliberately because a gamerule affects the world rather than just the person entering the command.
Also popular on Amazon
- Record the edition, game version, world name, and current value by running a query.
- Back up the world or use a test copy when the setting can alter normal survival behavior.
- Announce the intended change to other players, especially for rules that affect inventory, time, weather, mob behavior, or command output.
- Apply one rule at a time from an authorized player, command block, function, or server console.
- Query the rule again and have a player verify the visible behavior in the world.
- Keep a short change log so an administrator can restore the previous value if the group changes its mind.
This workflow avoids confusing a permission failure with a rule failure and makes it possible to reverse a setting without guessing its previous state.
What should I remember about Minecraft gamerules?
/gamerule performs both jobs: omit the value to inspect a setting, or provide a valid Boolean or integer value to change it. Java and Bedrock differ in case, available rules, menus, and cheat behavior, so use the edition’s autocomplete every time a copied command is uncertain.
Frequently Asked Questions
Will changing one gamerule disable Bedrock achievements?
The achievement restriction is tied to enabling cheats in a Bedrock world, not to the text of a particular gamerule. Before enabling cheats, decide whether preserving achievements matters for that save; server or script execution can have different handling.
Can I enter a decimal for an integer gamerule?
No. Integer gamerules require whole-number input, so a decimal value is rejected rather than rounded. Remove the fractional part and use the integer format shown by autocomplete for your edition.
Why does the same gamerule have different capitalization on my two installations?
Java and Bedrock use different command-name conventions, and their rule sets are not identical. Java uses case-sensitive documented names, while Bedrock’s command suggestions provide lowercase names; always select the name offered by the installation receiving the command.
Where can I find a rule that is not listed in the settings screen?
The graphical menus expose only a subset of gamerules. Query and set the missing rule with /gamerule from an authorized context, or use the Bedrock Editor export interface when that workflow applies.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

