Mojira Archive
MC-48488

/trigger prints incorrect error message for players who do not have a score for an objective

The bug

Using /trigger for a player who has no score for an objective (see MC-79255) shows the error message commands.trigger.invalidObjective:

Invalid trigger name [objective name]

This is pretty misleading and should instead be something like

The player [player name] has no score entry for the objective [objective name]

If this is no bug, tab-completing the objective argument on /trigger should not return invalid objectives.

How to reproduce

/scoreboard objectives add someObjective trigger
/trigger someObjective set 1

Will print "Invalid trigger name someObjective" in chat. Note that trigger objectives that aren't enabled print a different message: "Trigger someObjective is not enabled". Giving the objective a value or enabling its trigger for the player will make it work:

/scoreboard players set @p someObjective 0
/trigger someObjective set 1

Will set someObjective to 1 for me.