Minecraft Game Rules Reference

Complete reference for Minecraft game rules — keepInventory, mobGriefing, doDaylightCycle, and more.

Game rules let you toggle specific gameplay mechanics on your server. Changes take effect immediately — no restart needed.

How to Change Game Rules

Open Console on the XGamingServer panel and run:

gamerule [rule] [value]

For example: gamerule keepInventory true

RuleDefaultDescription
keepInventoryfalsePlayers keep items on death
doDaylightCycletrueTime progresses naturally
doWeatherCycletrueWeather changes naturally
mobGriefingtrueMobs can destroy blocks (creepers, endermen, etc.)
doFireTicktrueFire spreads naturally
pvptruePlayers can damage each other
announceAdvancementstrueAdvancement messages in chat
doInsomniatruePhantoms spawn when players skip sleep
doImmediateRespawnfalseSkip death screen
naturalRegenerationtrueHealth regenerates from food
randomTickSpeed3Speed of random ticks (crops, decay, etc.)
spawnRadius10Spawn point spread radius
playersSleepingPercentage100Percent of players needed to skip night
maxEntityCramming24Max entities in one space before damage
doTileDropstrueBlocks drop items when broken
doMobSpawningtrueMobs spawn naturally
commandBlockOutputtrueCommand blocks show output in chat
showDeathMessagestrueDeath messages in chat
drowningDamagetruePlayers take drowning damage
fallDamagetruePlayers take fall damage
fireDamagetruePlayers take fire damage

Common Server Configurations

Casual/Friendly Server:

gamerule keepInventory true
gamerule mobGriefing false
gamerule doFireTick false
gamerule playersSleepingPercentage 50

Hardcore Experience:

gamerule naturalRegeneration false
gamerule doImmediateRespawn false
gamerule doInsomnia true

💡 Tip: Use gamerule playersSleepingPercentage 0 to allow a single player to skip the night without needing everyone in bed.

📝 Note: Game rule changes are saved to the world and persist across restarts.

See also: Configure Minecraft | Disable Monsters

If you need help, join our Discord.

How is this guide?

40% Off — Limited TimeGet your Minecraft server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page