mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 06:24:06 +01:00
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
|
--- a/net/minecraft/server/IProjectile.java
|
||
|
+++ b/net/minecraft/server/IProjectile.java
|
||
|
@@ -4,6 +4,10 @@
|
||
|
import java.util.UUID;
|
||
|
import javax.annotation.Nullable;
|
||
|
|
||
|
+// CraftBukkit start
|
||
|
+import org.bukkit.entity.LivingEntity;
|
||
|
+// CraftBukkit end
|
||
|
+
|
||
|
public abstract class IProjectile extends Entity {
|
||
|
|
||
|
private UUID shooter;
|
||
|
@@ -19,6 +23,7 @@
|
||
|
this.shooter = entity.getUniqueID();
|
||
|
this.c = entity.getId();
|
||
|
}
|
||
|
+ this.projectileSource = entity == null ? null : (LivingEntity) entity.getBukkitEntity(); // CraftBukkit
|
||
|
|
||
|
}
|
||
|
|
||
|
@@ -101,6 +106,7 @@
|
||
|
}
|
||
|
|
||
|
protected void a(MovingObjectPosition movingobjectposition) {
|
||
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // CraftBukkit - Call event
|
||
|
MovingObjectPosition.EnumMovingObjectType movingobjectposition_enummovingobjecttype = movingobjectposition.getType();
|
||
|
|
||
|
if (movingobjectposition_enummovingobjecttype == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
|