/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
Created Issue:
/testfor command cannot target spectators
/testfor command cannot target spectators, however in the autocompletion there is the option to target spectators.
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
- Unresolved
- Open
- Unconfirmed
- Windows
- Windows 10 (10.0.19044.1526)
- 1.19.10.23 Preview 1.19.0
/testfor command cannot target spectators, however in the autocompletionthere is the option to target spectators.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 insteadTarget 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
is duplicated by
is duplicated by
Thank you for your report!
We're tracking this issue in MCPE-158042, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Thank you for your report!
We're tracking this issue in MCPE-158042, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
no command can test for m=spectator. not sure why.. I tried to use it for /tellraw @a[m=!spectator] but it just says "Game mode 'spectator' is invalid". I instead made 2 sets of command blocks for m=creative and m=survival to work around this.