Improve calling of ProjectileHitEvent. Fixes BUKKIT-3872

This commit is contained in:
Andre LeBlanc
2013-03-23 12:16:00 -04:00
committed by GJ
parent 45d3e2514d
commit 08f3df82eb
5 changed files with 10 additions and 15 deletions

View File

@@ -178,6 +178,7 @@ public class EntityFishingHook extends Entity {
}
if (movingobjectposition != null) {
org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event
if (movingobjectposition.entity != null) {
if (movingobjectposition.entity.damageEntity(DamageSource.projectile(this, this.owner), 0)) {
this.hooked = movingobjectposition.entity;