Made ProjectileHitEvent fire instantly when projectiles don't hit entities.

This commit is contained in:
sunkid authored and EvilSeph committed 2011-07-14 22:37:31 -04:00
1 parent 43492ab6af
commit 30a382a6dc
5 files changed
+18 -6

No files matched your search

@@ -7,6 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftLivingEntity;
import org.bukkit.entity.Projectile;
import org.bukkit.event.entity.EntityDamageByProjectileEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
// CraftBukkit end
@@ -162,6 +163,10 @@ public class EntityArrow extends Entity {
float f2;
if (movingobjectposition != null) {
// CraftBukkit start
ProjectileHitEvent phe = new ProjectileHitEvent((Projectile) this.getBukkitEntity());
this.world.getServer().getPluginManager().callEvent(phe);
// CraftBukkit end
if (movingobjectposition.entity != null) {
// CraftBukkit start
boolean stick;