📜
Admin
/gamerule
Change how the world behaves — keep items, freeze time, and more.
At a glance
Syntax
Syntax
/gamerule <rule> [value]commandtargetcoordsvaluerequiredoptional
See it
What it does
The world's state changes instantly
Anatomy
Every part, explained
- 1
CommandRequired/gameruleReads or sets a world rule.
- 2
RuleRequired<rule>e.g. keepInventory, doDaylightCycle, mobGriefing.
- 3
ValueOptional[value]true/false or a number. Omit to check the current value.
Your turn
Try it yourself
Playground
3 tokens · press Enter to run
Copy & paste
Examples
/gamerule keepInventory trueKeep your items when you die.
/gamerule doDaylightCycle falseFreeze the sun in place.
/gamerule randomTickSpeed 3Control how fast crops grow.
Avoid these
Common mistakes
✕
/gamerule keepinventory true✓
/gamerule keepInventory trueRule names are case-sensitive (camelCase).
✕
/gamerule keepInventory 1✓
/gamerule keepInventory trueBoolean rules want true/false, not 1/0.
Keep going