minecraft.mode.<name>.invalid
Severity: error
The value provided for this mode field is not one of the accepted values. Mode fields expect a specific keyword from a fixed list of options.
This error is triggered by the language server when a mode or enum field receives a value that is not in the list of valid options. Each mode field (such as game mode, fill mode, clone mode, etc.) has a fixed set of accepted string values, and providing anything outside that set results in this error.
For example:
- A
gamemodefield must be one ofsurvival,creative,adventure,spectator - A
fillcommand'sfillModemust be one ofdestroy,hollow,keep,outline,replace - A
clonecommand'smaskModemust be one offiltered,masked,replace
The following triggers the error because "god" is not a valid game mode:
# Invalid — "god" is not a valid game mode
gamemode god @s
# Correct
gamemode creative @s
gamemode survival @sIn JSON:
Replace the invalid mode value with one of the accepted values. Check the specific field's documentation or the command syntax page for the list of valid options:
- For command mode parameters, see the individual command's syntax page in this repository (e.g.,
minecraft/commands/gamemode/syntax.md) - For JSON mode fields, check the Minecraft Bedrock documentation
{ "minecraft:movement": { "type": "flying" // Invalid if "flying" is not an accepted mode value } }