Add EntityPushByExplodeEvent
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.
Yo, is this PR ready? Seems like it could fix the issue. @lynxplay https://github.com/PaperMC/Paper/issues/13326
I have tested it and locally it works. I am just waiting on a second review from somebody or the first reviewer.
https://github.com/yoyosource/Paper/blob/feature/EntityPushByExplodeEvent/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java#L2074
May trigger NPE and requires a minor modification.
event.setCancelled(legacyEvent != null && legacyEvent.isCancelled());
Good catch. I will fix it later.
@Huge-mistake would it be possible for you to fix this. I have some private stuff blocking me in general.
If so I would add you to the my fork.
@Huge-mistake would it be possible for you to fix this. I have some private stuff blocking me in general.
The solution I listed above is effective, so feel free to use it.
event.setCancelled(legacyEvent != null && legacyEvent.isCancelled());
@Huge-mistake can you have a quick check through this PR. I think I fixed it now.