Invalid Gamerule
A command or config sets a game rule to a value it does not accept. The rule expects a specific type (true/false or a number), and the value given does not fit.
What does this error mean?
Game rules are typed: some are booleans, some are integers. 'Invalid gamerule value' means you tried to set a rule to something of the wrong type or out of range, for example a word where a number is expected.
Invalid gamerule value
Most Common Causes
- A boolean rule set to something other than true/false.
- An integer rule given a non-numeric value.
- A misspelled game rule name.
- A value out of the rule's valid range.
- A datapack or command block sending a bad value.
How To Diagnose
- Note which rule and value the error mentions.
- Check the rule's expected type (boolean or integer).
- Run '/gamerule <rule>' alone to see its current value.
- Look for command blocks or datapacks setting it.
Recommended Fixes
- Use the correct type
Set boolean rules to true/false and integer rules to a whole number. - Fix the rule name
Correct any typo, run '/gamerule' to list valid names. - Stay in range
For numeric rules, use a sensible non-negative value. - Audit command blocks/datapacks
Find and fix the source sending the invalid value.
Frequently Asked Questions
Type '/gamerule' and the tab-completion lists every available rule.
Rules like randomTickSpeed or maxEntityCramming take integers, most others are true/false.
Yes, a datapack function may set a rule incorrectly, check its commands.