Skip to content

Enshrouded 1.0 is out! 🎉 Get 25% OFF your next Enshrouded Server today!

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.

Updated 3 min read

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

  1. Open the Console tab.
  2. Type the command in the Send a command box without the leading slash and press Enter.
gamerule keep_inventory true

To read a rule without changing it, leave the value off:

gamerule keep_inventory

Rule 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.

What it does1.21.10 and older1.21.11 and newerStarts as
Players keep items and XP on deathkeepInventorykeep_inventoryfalse
Day and night move ondoDaylightCycleadvance_timetrue
Weather changes by itselfdoWeatherCycleadvance_weathertrue
Mobs spawn naturallydoMobSpawningspawn_mobstrue
Mobs can change blocksmobGriefingmob_griefingtrue
Random block ticks per chunk section each game tickrandomTickSpeedrandom_tick_speed3
Share of players who must sleep to skip the nightplayersSleepingPercentageplayers_sleeping_percentage100
Advancements are announced in chatannounceAdvancementsshow_advancement_messagestrue
Command blocks runcommandBlocksEnabled (1.21.9 and 1.21.10 only)command_blocks_worktrue

The descriptions in the first column are paraphrased from the Minecraft Wiki game rule page.

Examples

Keep inventory on death:

gamerule keep_inventory true

Let 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 0

Freeze the time of day, then restore it:

gamerule advance_time false
gamerule advance_time true

Stop creepers and other mobs breaking blocks:

gamerule mob_griefing false

To 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.

Config Editor switchGame rule
PvPpvp
Netherallow_entering_nether_using_portals
Hostile mobsspawn_monsters
Command blockscommand_blocks_work

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.
Tip

Run gamerule with no value on a rule you are unsure about. It prints the current setting and changes nothing.

Was this guide helpful?

Still stuck?

Talk to a real person, we answer fast.

  • Open a ticket

    Paste the exact error and name your server, so we can look at it from our side.

  • Ask on Discord

    Chat with the team and other server owners.

  • Browse the Help Centre

    Versions, mods, plugins, backups and RAM sizing, all in plain English.

Ready to launch your Minecraft server?

Aussie hardware, NVMe disks and DDoS protection, with the version and mod loader yours to change whenever you like.