mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Improve calling of ProjectileHitEvent. Fixes BUKKIT-3872
This commit is contained in:
1 parent
45d3e2514d
commit
08f3df82eb
5 files changed
+10
-15
No files matched your search
@@ -3,9 +3,7 @@ package net.minecraft.server;
|
||||
import java.util.List;
|
||||
|
||||
// CraftBukkit start
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -209,11 +207,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
float f3;
|
||||
|
||||
if (movingobjectposition != null) {
|
||||
// CraftBukkit start
|
||||
Projectile projectile = (Projectile) this.getBukkitEntity();
|
||||
ProjectileHitEvent phe = new ProjectileHitEvent(projectile);
|
||||
this.world.getServer().getPluginManager().callEvent(phe);
|
||||
// CraftBukkit end
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // CraftBukkit - Call event
|
||||
|
||||
if (movingobjectposition.entity != null) {
|
||||
f2 = MathHelper.sqrt(this.motX * this.motX + this.motY * this.motY + this.motZ * this.motZ);
|
||||
|
||||
Reference in new issue
Block a user