mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
9da047989c
By: md_5 <git@md-5.net>
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
--- a/net/minecraft/world/entity/projectile/IProjectile.java
|
|
+++ b/net/minecraft/world/entity/projectile/IProjectile.java
|
|
@@ -15,6 +15,10 @@
|
|
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
|
import net.minecraft.world.phys.Vec3D;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.projectiles.ProjectileSource;
|
|
+// CraftBukkit end
|
|
+
|
|
public abstract class IProjectile extends Entity {
|
|
|
|
private UUID shooter;
|
|
@@ -30,6 +34,7 @@
|
|
this.shooter = entity.getUniqueID();
|
|
this.c = entity.getId();
|
|
}
|
|
+ this.projectileSource = (entity != null && entity.getBukkitEntity() instanceof ProjectileSource) ? (ProjectileSource) entity.getBukkitEntity() : null; // CraftBukkit
|
|
|
|
}
|
|
|
|
@@ -112,6 +117,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) {
|