Minecraft game rules: the ones worth changing on a server
keepInventory, sleeping, mob griefing, phantoms and more — what each rule does, its default, and the side effects nobody mentions.
Game rules are switches stored in the world itself that change how Minecraft plays: whether you keep your items when you die, how many players need to sleep to skip the night, whether creepers blow holes in the ground. They are set with the /gamerule command and take effect immediately — no restart.
This page covers the rules servers actually change, their defaults, and what else each one affects. Several have side effects that are not obvious from the name.
How to change them
gamerule keepInventory true— set a rule. In the console, without the slash; in game, with one, as an operator.gamerule keepInventory— with no value, shows the current setting.- Rules belong to the world, not the server. With several worlds (for example through Multiverse), set them in each one.
- On Cobbly you can also change them from the World tab, under Level Config, without typing commands.
Rule names are case-sensitive in older versions. Very recent versions have started renaming game rules to lower-case names with underscores, so if a name below is rejected, type /gamerule and press Tab to see your version’s spelling.
Death and difficulty
keepInventory(defaultfalse) —truekeeps items and XP on death. The single most-changed rule on friend servers. It makes the game far more forgiving; it also makes it hard to lose anything to griefers who kill you.doImmediateRespawn(defaultfalse) — skips the death screen.naturalRegeneration(defaulttrue) —falsemeans health only comes back from potions and golden apples. The classic UHC setting.fallDamage,fireDamage,drowningDamage,freezeDamage(all defaulttrue) — turn individual damage types off. Handy for build servers and parkour events.showDeathMessages(defaulttrue) — “Steve was slain by Zombie” in chat.
Night, weather and sleeping
playersSleepingPercentage(default100) — the percentage of online players who must be in bed to skip the night. At 100, one player who refuses to sleep keeps everyone in the dark. The most useful rule on any multiplayer server. Set it to50for half, or1for any single player.doDaylightCycle(defaulttrue) —falsefreezes the time of day. Set the time first withtime set day.doWeatherCycle(defaulttrue) —falsefreezes the weather.weather clearfirst.doInsomnia(defaulttrue) —falsestops phantoms spawning. Phantoms appear for players who have not slept in three in-game days; on servers where some players never sleep, they are a constant nuisance.
Mobs
mobGriefing(defaulttrue) — whether mobs can change blocks.falsestops creeper craters and endermen stealing blocks. The side effects: villagers can no longer farm or pick up food to breed, sheep cannot eat grass so their wool never regrows, and piglins cannot pick up gold to barter. It breaks a lot of farms. Many servers prefer a protection plugin that blocks explosions only.doMobSpawning(defaulttrue) —falsestops natural spawning entirely. Spawners still work.doPatrolSpawninganddoTraderSpawning(defaulttrue) — pillager patrols and wandering traders.disableRaids(defaultfalse) —trueturns raids off, which also breaks raid farms.maxEntityCramming(default24) — how many mobs can share one space before they take suffocation damage. A built-in cap on accidental mob piles. Leave it alone or lower it; raising it invites lag.forgiveDeadPlayers(defaulttrue) anduniversalAnger(defaultfalse) — how neutral mobs like piglins and wolves hold a grudge.
Blocks, fire and drops
doFireTick(defaulttrue) —falsestops fire spreading and burning out. Popular on build servers and anywhere with wooden builds near lava.randomTickSpeed(default3) — how fast crops grow, leaves decay and grass spreads. Raising it speeds farms up and makes the server work harder in every loaded chunk. A modest increase is fine;100is how people crash servers.doTileDrops,doMobLoot,doEntityDrops(all defaulttrue) — whether blocks, mobs and entities like minecarts drop items.tntExplosionDropDecay(defaultfalse),blockExplosionDropDecayandmobExplosionDropDecay(defaulttrue) — whether explosions destroy some of the blocks they break instead of dropping them all.spawnRadius(default10) — how far from world spawn new players and players without a bed appear.
Chat and feedback
announceAdvancements(defaulttrue) — the “Steve has made the advancement…” messages.sendCommandFeedback(defaulttrue) —falsehides command results from the player who ran them. Turning it off by accident is a common reason commands “do nothing”.commandBlockOutput(defaulttrue) — command blocks reporting to operators in chat. Turn it off on maps with clock-driven command blocks, or chat becomes unreadable.logAdminCommands(defaulttrue) — operators’ commands shown to other operators and in the log.reducedDebugInfo(defaultfalse) —truehides coordinates on the F3 screen. Some survival servers use it to make exploring harder.
A good default set for friends
If you just want a relaxed survival server, these four cover what most groups ask for:
gamerule playersSleepingPercentage 50gamerule doInsomnia falsegamerule keepInventory true— if the group prefers it; ask first.gamerule doFireTick false— if anyone builds in wood.
For anything stronger — no hunger, no creeper damage only, per-area rules — a plugin is a better fit than a world-wide rule. See A beginner’s guide to Paper plugins.