mojira.dev
MC-106681

Scoreboard teams leave doesn't work if first player fails

If you have

/scoreboard teams leave @e[tag=test] @e[tag=test0]

and there's no entity with the tag "test" the entity with the tag "test0" will not leave the team.

This only happens if the first player is a selector without result entity, if it happens to the second one, the 3rd, 4th, 5th, etc. will still leave the team, if the first is not a selector the rest also succeeds.

Linked issues

Comments 1

Probably the same reason as for MC-99758

The third argument is defined as being a selector. If this is the case and the selector includes multiple entities the command is executed for each entity. In this case for "@e[tag=test]", however like you said no entities which match the criterias exist. Only if no selector index is provided or the selector defines only a single entity the command is directly executed. As suggested in MC-99758 the "scoreboard teams" command should not return a selector index because when the command is executed it removes all matching entities at once and can also handle multiple selectors.

user-f2760

(Unassigned)

Confirmed

/scoreboard, command, leave, scoreboard-teams, selector

Minecraft 1.10.2, Minecraft 16w33a, Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1

Minecraft 17w45b

Retrieved