mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 03:25:15 +01:00
23 lines
932 B
Diff
23 lines
932 B
Diff
--- a/net/minecraft/server/EntityProjectile.java
|
|
+++ b/net/minecraft/server/EntityProjectile.java
|
|
@@ -35,6 +35,7 @@
|
|
public EntityProjectile(World world, EntityLiving entityliving) {
|
|
this(world, entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight() - 0.10000000149011612D, entityliving.locZ);
|
|
this.shooter = entityliving;
|
|
+ this.projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
|
|
}
|
|
|
|
protected void i() {}
|
|
@@ -164,6 +165,11 @@
|
|
this.e(movingobjectposition.a());
|
|
} else {
|
|
this.a(movingobjectposition);
|
|
+ // CraftBukkit start
|
|
+ if (this.dead) {
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition);
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|
|
}
|
|
|