© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
AdmincraftA
Admincraft•2y ago•
3 replies
Xaiter

Selectors Not Working With Vanilla gamemode Command In 1.21

Encountered a very strange issue with 1.21.1

Example command that worked in 1.20.4:
/execute as @a[tag=goingToSpawn] run gamemode adventure @s
/execute as @a[tag=goingToSpawn] run gamemode adventure @s


And, as expected, Minecraft would iterate through each player included in the selector and execute the command as them and properly set their gamemode.

However, as of 1.21.1... It doesn't matter WHAT arguments are fed to the
gamemode
gamemode
command. It always, only, ever targets the person to sent the command. I've even tried:

/execute run gamemode adventure @a[tag=goingToSpawn]
/execute run gamemode adventure @a[tag=goingToSpawn]

/execute as @a[tag=goingToSpawn] run gamemode adventure
/execute as @a[tag=goingToSpawn] run gamemode adventure


But it will always target ME. I don't have the tag, I'm not the subject of it. I'm certain the selectors are working properly because this command works correctly:

/execute as @a[tag=goingToSpawn] run say hello
/execute as @a[tag=goingToSpawn] run say hello


And that properly targets the dummy and prints the text as expected. Did the
/gamemode
/gamemode
command break in 1.21? What the heck is going on?
AdmincraftJoin
10,704Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Use vanilla selectors in commands.
AdmincraftAAdmincraft / questions
2y ago
spawner lootable not working on minecraft 1.21.1
AdmincraftAAdmincraft / questions
14mo ago
command not working?
AdmincraftAAdmincraft / questions
3y ago
Disable Vanilla /op command
AdmincraftAAdmincraft / questions
3y ago