#when unequipping armor execute a command

1 messages · Page 1 of 1 (latest)

sly ether
#

When unequipping armor, an example command would be executed: "You have unequipped your armor"

lunar hazel
sly ether
#

I didn't understand what you meant

#

I don't know how to check if the item has been unequipped and execute a command if it has been unequipped

lunar hazel
#

in commands.

#

or !q.is_item_name_any if you're using animation controllers.

sly ether
#

I know how it works

lunar hazel
# sly ether How would I use hasitem?

I'm pretty sure has item supports ! just like all the other target selectors. For example:-

/tag @s[tag=!tagged] add tagged

will add tag 'tagged' to me if I don't already have the tag 'tagged'.

#

or you can also use execute unless in case it doesn't supports it.

sly ether
#

I know that, but I'm trying to understand how I would check that the person took off the armor? And I would take away the Egypts

lunar hazel
#

While the player has the tag, you can keep checking if the armor is still present. If it is not, you can execute your desired commands and remove the tag.

sly ether
#

That's what I don't know

lunar hazel
sly ether
#

But how??

lunar hazel