Change game rules on your Minecraft server
Run the gamerule command in the Console, with a table of the old and new rule names after the 1.21.11 rename and the settings that moved into rules.
Game rules are switches and numbers that change how a world behaves: whether players keep their items when they die, whether the day moves on, whether mobs can break blocks. You change them with the gamerule command in the Console tab, and no plugin is needed. The one catch is that Minecraft 1.21.11 renamed every rule, so the name you type depends on your version.
Checked against Minecraft Java Edition 26.3, October 2026.
Run the command
- Open the Console tab.
- Type the command in the Send a command box without the leading slash and press Enter.
gamerule keep_inventory trueTo read a rule without changing it, leave the value off:
gamerule keep_inventoryRule names are case-sensitive. Most rules are true or false, and a few take a whole number. A rule you set is saved in the world's data, so it stays after a restart. Operators can also run gamerule in the game, with the slash. To make someone an operator, use the Players tab (Whitelist players and set operators).
The names changed in 1.21.11
Before 1.21.11, rules were written in camel case, like keepInventory. From 1.21.11, which includes 26.x, they are lowercase words joined by underscores, like keep_inventory. Some were reworded as well. Check your version in the JAR Manager tab, then use the matching column. The Starts as column is the game's own default for each rule.
The descriptions in the first column are paraphrased from the Minecraft Wiki game rule page.
Examples
Keep inventory on death:
gamerule keep_inventory trueLet one player's sleep skip the night. A percentage of 0 still needs one player in bed, but no more than that:
gamerule players_sleeping_percentage 0Freeze the time of day, then restore it:
gamerule advance_time false
gamerule advance_time trueStop creepers and other mobs breaking blocks:
gamerule mob_griefing falseTo make random block ticks happen more often, raise random_tick_speed from its default. Raise it in small steps and watch the TPS reading in the Console tab.
Rules that used to be server.properties settings
Mojang moved four settings out of server.properties and into game rules in 1.21.9. On 1.21.9 and newer, use the rule instead of the matching switch in Config Editor.
On 1.21.9 and 1.21.10 the last three use camel case: allowEnteringNetherUsingPortals, spawnMonsters and commandBlocksEnabled.
If the command fails
- The server rejects the rule name. The name does not match your version. Compare it with the table, and check the case.
- Nothing changes for a rule that is not in the table. Look up its current name on the Minecraft Wiki game rule page, which lists the old and new names side by side.
- You are not sure what a rule is set to. Run it with no value, as in the tip below.
Run gamerule with no value on a rule you are unsure about. It prints the current setting and changes nothing.
Was this guide helpful?
Related guides
Turn off PvP on your Minecraft server
Stop players damaging each other. Use the pvp game rule on 1.21.9 and newer, or the Config Editor PvP switch on older servers.
Turn off Minecraft advancement messages
Stop advancement announcements in chat with one game rule from the Console, using the right name for your version, and turn them back on later.
Teleport and home commands with EssentialsX
Give players tpa, sethome, home and back with EssentialsX on Paper or Purpur, grant the permissions with LuckPerms and set teleport delays and limits.
