Jump to content

[1.7.10] Detect when armor is removed or dropped


Mordenkainen

Recommended Posts

I am trying to figure out how to detect when a player removes armor, even if this was done because the player died.

 

I need to detect when any armor is removed, so this is not something I could code into a particular item.

 

Is there any kind of event I could listen for that would give me this information? Ideally I would need access to both the new and old itemstacks involved.

 

For death I can trap it via the event for that, but I am not sure how to tell if the player manually removes armor.

 

Any advice would be appreciated.

 

Ultimately what I want to do is add a type of buff to the player that temporarily adds an enchantment to whatever armor they are wearing, and removes the enchantment when the armor is removed.

 

Morden

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.