mojira.dev
MC-60692

gamemode selector m doesn't work with negation

I was trying to change the gamemode of people that died at least once to spectator (but only for people who aren't in spectator), so I used this command:
/gamemode spectator @a[score_dc=!0,m=!3] (with dc being the deathcounter)
and I noticed that apparently the m part (which is supposed to detect your gamemode) doesn't work with negatives, like:
this works as intended: /gamemode spectator @a[m=3]
this ignores the m=!3: /gamemode spectator @a[m=!3]

I hope this gets you enough informormation, it's easy to work around it, but I think it would be a good thing and probably easier to fix this 😉

Linked issues

Comments 13

the feature to do m=! is never introduced

logically you would think that it would be added, m=! means "gamemode not equal to"

that ability has only been anounced with: type, name and team

3 more comments

Could this bug be reopened please? I see no reason for it to be considered invalid.

Confirmed in 15w45a

Can confirm for 15w50a.

As a side effect of the fix, it's now also possible to use names instead of just the numbers for the game mode, so @p[m=spectator] or @p[m=sp] are both alternatives to @p[m=3]. Negation also work with both, numerical or named modes, so @a[m=!creative] or @a[m=!c] or @a[m=!1].

Awesome! Thank you 😸

MrUks

michael

Confirmed

Minecraft 14w27b, Minecraft 1.8.1, Minecraft 15w40b, Minecraft 15w45a, Minecraft 15w50a

Minecraft 16w02a

Retrieved