SPIGOT-7968: ProjectileHitEvent not trigerred when arrow hits entity

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2024-11-30 15:16:28 +11:00
parent 9850cb85dd
commit 61ca2bcfef

View File

@ -49,6 +49,15 @@
this.hasImpulse = true;
}
} else {
@@ -284,7 +298,7 @@
continue;
}
- ProjectileDeflection projectiledeflection = this.hitTargetOrDeflectSelf(movingobjectpositionentity);
+ ProjectileDeflection projectiledeflection = this.preHitTargetOrDeflectSelf(movingobjectpositionentity); // CraftBukkit - projectile hit event
this.hasImpulse = true;
if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) {
@@ -356,7 +370,7 @@
protected void tickDespawn() {
++this.life;