← Back to Command Directory ← Back to Home

/gamerule

Sets or queries game rules for the world.

Syntax

/gamerule  [value]

Parameters

NameRequiredDescription
ruleYesGamerule identifier.
valueNoNew value for the rule.

Examples

/gamerule commandBlockOutput true
/gamerule doDaylightCycle false

Notes

Version Differences

Available gamerules differ between Java and Bedrock.

Related Commands