mojira.dev
MC-182041

@s Target Selector

I've read an issue about this @s selector that it doesn't work in command blocks and @s is never meant to be for the command blocks. If that so, where can we use the @s selector except the chatbox?

Comments 2

This site is for Bug reports only. Ask for help in other forums.
But, to answer your question, it can be used in /execute commands, as arguments for the function that runs after.
Example:
/execute as @e[type=skeleton] run replaceitem entity @s weapon.mainhand diamond_sword 1
equips all skeletons with diamond swords.

Ah, sorry but thanks for answering my question anyway. 🙂

Scott Gomez Andoy

(Unassigned)

Unconfirmed

(Unassigned)

command, selector

1.15.2

Retrieved