/testfor command cannot target spectators
Target selectors can use the "m" selector argument to limit selection by game mode, but there is no value to select only players in Spectator mode.
To Reproduce: Run the following command:
/testfor @a[m=spectator]
Expected result: List of spectators were shown
Observed: The error "Game mode 'spectator' is invalid' was shown instead
2022-06-23, 11:46 AM
2022-09-20, 08:15 PM
2022-09-20, 08:15 PM
4
1
811324
selector, selector-argument, target-selector, testfor