Skip to content

Conversation

@TonytheMacaroni
Copy link
Contributor

Adds EntityEquipmentChangeEvent, a more generic version of PlayerArmorChangeEvent that applies to the equipment changes of living entities.

At the moment, the patch changes PlayerArmorChangeEvent to extend EntityEquipmentChangeEvent. I'm not sure on this, especially since that would make PlayerArmorChangeEvent no longer extend PlayerEvent.

Another alternative I considered was for the event to instead expose a map of slots -> equipment changes, so that the event is called only once when multiple slots are changed, and avoiding changing the inheritance of PlayerArmorChangeEvent.

@TonytheMacaroni TonytheMacaroni requested a review from a team as a code owner November 25, 2024 20:42
@lynxplay
Copy link
Contributor

lynxplay commented Dec 2, 2024

Alternatively we deprecate PlayerArmorChangeEvent in favour of a PlayerEquipmentChangeEvent which then can extend that.

@Machine-Maker
Copy link
Member

If we are gonna replace the playerarmorchangeevent, I would kind of like to chose a new name that more accurately reflects what its detecting. It's detecting on the next tick if the armor has changed from what it was previously to send to clients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

4 participants