-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add EntityPushByExplodeEvent #13252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add EntityPushByExplodeEvent #13252
Conversation
lynxplay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have EntityKnockbackEvent and EntityKnockbackByAttackEvent which both are fine with plain entities.
The event you are proposing is pretty much a 1 to 1 copy of EntityPushedByEntityAttackEvent.
I think the solution here is to call the previously mentioned events.
Change org.bukkit.craftbukkit.event.CraftEventFactory#callEntityKnockbackEvent to take in an CraftEntity instead of CraftLivingEntity and then call the correct legacy and paper events if the entity is living vs not.
Update CraftEventFactory.callEntityKnockbackEvent
|
I have tested it and locally it works. I am just waiting on a second review from somebody or the first reviewer. |
|
May trigger NPE and requires a minor modification. |
|
Good catch. I will fix it later. |
Add a way to check what Entity got pushed by an Explosion happening. This event is only called for non LivingEntities because there is the EntityKnockbackEvent for that already. I am using this on a server where I am a Developer already for cancelling specific Explosions knocking around other Entities.