SPIGOT-5812: ProjectileHitEvent fires twice if projectile is an Egg

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2020-06-26 08:02:51 +10:00
parent 53cfc6428c
commit add541e2df

View file

@ -1,14 +0,0 @@
--- a/net/minecraft/server/EntityProjectile.java
+++ b/net/minecraft/server/EntityProjectile.java
@@ -42,6 +42,11 @@
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS && !flag) {
this.a(movingobjectposition);
+ // CraftBukkit start
+ if (this.dead) {
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition);
+ }
+ // CraftBukkit end
}
Vec3D vec3d = this.getMot();