What Is the Minecraft Gamerule Command?
The /gamerule command queries or changes world-wide settings: death inventory, mob behavior, spawning, weather, command feedback, random block ticks, and more. Pick the edition and version first because Java 26.1 changed the rule registry, while Bedrock exposes a separate list and defaults.
Use /gamerule <rule> to query a value, or /gamerule <rule> <value> to change it. Boolean rules accept true or false; integer rules accept whole numbers. Bedrock playerWaypoints requires everyone or off.
Find the right rule
Search IDs and descriptions or filter by player, mobs, world, spawning, drops, commands, and display. The selected card shows the value type and default before you make a change.
Query before changing
Switch to Query current to generate a command with no value. This is useful on an existing world when you do not know whether a server owner already changed the default.
Version-aware Java syntax
Java 26.1 introduced namespaced snake_case gamerule IDs. The generator automatically switches between modern IDs such as minecraft:keep_inventory and legacy names such as keepInventory.
Defaults differ by edition
Java random tick speed defaults to 3, while Bedrock defaults to 1. Bedrock also includes settings such as showCoordinates that are not Java gamerules.
Changes persist per world
Game rules remain active after restarts until changed again. In Java 26.1 and later they are stored in data/minecraft/game_rules.dat rather than the old level.dat location.
Change one setting and keep its old value
Enable cheats in a private world or use an operator account on a server. Choose the edition and exact version, find the rule, and query its current value before changing it. Write that value down if you expect to restore the world later. A rule's default is a useful starting point, but it is not proof of the value already saved in an existing world.
Copy one command at a time and read the response. A misspelled rule is different from a valid rule that is already set to the requested value. If the game reports an unknown name, check the version picker instead of changing random letters in the command. Modern Java's namespaced names and older camelCase names belong to different command registries.
Change only the setting related to your goal. Increasing random tick speed affects eligible block updates; it does not make the whole server run faster or accelerate every machine. Very large values can create substantial work. For a demonstration, record the original speed and return to it when finished. Disabling mob spawning also does not remove mobs that are already present.
Does the change survive a restart?
Yes. Gamerules are saved with the world. Repeat the command with the previous value to undo a change rather than expecting a reconnect to reset it.
Why does the same command fail on another server?
Edition, game version and permission can differ. Plugins can also intercept commands. Check the selected rule against that server's own command completion and run it with sufficient permission.



