diff options
author | sunkid <sunkid@iminurnetz.com> | 2011-07-14 10:46:02 -0700 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2011-07-14 22:37:31 -0400 |
commit | 30a382a6dc20299b2a36c8bf4079a95e39a54366 (patch) | |
tree | 2a2f04dad6e22917b37edb6384ff5fece3a868f5 /src/main/java/net/minecraft/server/EntityArrow.java | |
parent | 43492ab6af1bf3502ed5a49550dcbb0c0a8a3fce (diff) | |
download | craftbukkit-30a382a6dc20299b2a36c8bf4079a95e39a54366.tar craftbukkit-30a382a6dc20299b2a36c8bf4079a95e39a54366.tar.gz craftbukkit-30a382a6dc20299b2a36c8bf4079a95e39a54366.tar.lz craftbukkit-30a382a6dc20299b2a36c8bf4079a95e39a54366.tar.xz craftbukkit-30a382a6dc20299b2a36c8bf4079a95e39a54366.zip |
Made ProjectileHitEvent fire instantly when projectiles don't hit entities.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityArrow.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityArrow.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index f0702168..69d40dfe 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -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; |