how to execute commands using on_equip? #338
Answered
by
Chikorita-Lover
Grxxney
asked this question in
Add-On Q&A
-
I want to execute an command (for example: /enchant @s infinity 1) when an player equip on (component: bridge:item_equipped_sensor -> on_quip) my item but I don't know if that's possible. If yes than how I can do that? |
Beta Was this translation helpful? Give feedback.
Answered by
Chikorita-Lover
May 28, 2021
Replies: 1 comment
-
You'd probably be better off using a behavior animation in the player behavior file. You could run this animation with the MoLang query |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
solvedDev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'd probably be better off using a behavior animation in the player behavior file. You could run this animation with the MoLang query
query.get_equipped_item_name == 'banana_split'
(if your item is something likebridge:banana_split
), and have the animation run the/enchant
command.