Guide · Configuration

The game rules every server owner should know

Game rules change how the world behaves: whether players keep items on death, whether creepers break blocks, how many players need to sleep. Minecraft 1.21.11 renamed all of them, so many guides online now show names that no longer work.

How to change a game rule

Run gamerule <rule> <value> in the console, or with a slash in game as an operator. Run it with no value to see the current setting. Rules apply immediately and are saved per world, so on Paper the Nether and End have their own copies.

From 1.21.11, including all 26.x versions, rule names are snake_case with an optional minecraft: prefix, for example keep_inventory. Older versions use camelCase names such as keepInventory. If you are unsure, type gamerule and press tab to list the names your version accepts.

The rules owners change most

Shown as the 1.21.11+ name, with the older name in brackets:

  • keep_inventory (keepInventory): players keep items and XP on death
  • mob_griefing (mobGriefing): creepers, endermen and ghasts can change blocks
  • players_sleeping_percentage (playersSleepingPercentage): share of players who must sleep to skip the night
  • pvp: players can hurt each other, a game rule since 1.21.9 (previously the pvp server property)
  • spawn_phantoms (doInsomnia): phantoms spawn for players who have not slept
  • show_advancement_messages (announceAdvancements): advancements announced in chat
  • advance_time (doDaylightCycle) and advance_weather (doWeatherCycle)
  • random_tick_speed (randomTickSpeed): crop growth and leaf decay speed; leave at 3 on survival servers

Fire spread changed shape

The old doFireTick on and off switch became fire_spread_radius_around_player, a number that controls how far from players fire can spread. Check the current value with gamerule fire_spread_radius_around_player before changing it, and test in a safe area.

Sensible defaults for an SMP

Most survival communities set players_sleeping_percentage to a low value so one or two sleepers skip the night. Keep inventory is a matter of taste; many SMPs leave it off but use a graves plugin instead, which keeps items safe without removing the stakes. mob_griefing off protects builds from creepers but also stops villagers farming and some mob farms, so think before switching it.

StormNodes Minecraft hosting

Run it on a StormNodes server

Skip the port forwarding and the PC that has to stay on. A StormNodes Minecraft server is online in minutes, and everything in this guide can be done from the panel.

  • Hosted in Portugal, close to players across Western Europe
  • NVMe storage, monthly billing and no setup fee
  • Paper, Purpur, Fabric and vanilla, switchable from the panel
  • Live console, file manager, SFTP, backups and schedules
  • Support in English and Portuguese

FAQ

Frequently asked questions

Why does /gamerule keepInventory not work anymore?
Minecraft 1.21.11 renamed game rules to snake_case. On current versions use /gamerule keep_inventory true, or with the prefix, minecraft:keep_inventory.
Do game rules reset when the server restarts?
No. They are saved in the world data and persist across restarts and server moves.
How do I make one player sleeping skip the night?
Set players_sleeping_percentage to 1 on 1.21.11 and newer, or playersSleepingPercentage on older versions. Any value above 0 means at least one player must sleep.