How to change the world rules — the /gamerule command
Generator /gamerule
Change world rules — adjust the parameters and copy the finished result
The /gamerule command changes the world rules. You can keep your inventory on death, disable mob spawning, stop time and much more.
Rule
Value
Default: false
Generated command
Paste it into the Minecraft chat (the T key) or a command block
Other commands
/give
Give an item to a player
/summon
Summon a mob or entity
/effect
Apply an effect to a player
/enchant
Enchant the item in hand
/gamemode
Change game mode
/tp
Teleport a player
/time
Change the time of day
/weather
Change the weather
/xp
Give experience to a player
/difficulty
Change world difficulty
/clear
Clear a player's inventory
/setblock
Place a block at coordinates
/fill
Fill an area with blocks
/spawnpoint
Set the spawn point
How does /gamerule work?
The /gamerule command changes the rules of the game world. Syntax: /gamerule <rule> <value>. Rules can be boolean (true/false) or numeric. Changes apply immediately and persist after a restart.
Popular rules
keepInventory true — keep your inventory on death. doDaylightCycle false — stop the day/night cycle. doWeatherCycle false — disable weather changes. mobGriefing false — mobs do not destroy blocks (creepers, endermen).
Rules for building
For comfortable building: keepInventory true + doDaylightCycle false + doWeatherCycle false + doMobSpawning false. This removes all distractions and lets you build in peace.
randomTickSpeed
The randomTickSpeed rule (default 3) controls the speed of plant growth, ice melting and fire spread. Increase it to 100+ for fast growth. Set it to 0 to stop completely.
Looking for Minecraft server hosting?
Launch your server in a minute — one-click mod and plugin installation, DDoS protection, powerful hardware. Promo code PROMO10 gives 10% off any plan.
