Added EntityTargetEvent for Experience Orbs, happens when it starts moving towards a human entity! Addresses BUKKIT-820

This commit is contained in:
ZNickq
2012-02-25 14:58:21 +02:00
committed by EvilSeph
parent cd90cec48c
commit bf01e93ab6
2 changed files with 22 additions and 10 deletions

View File

@@ -407,4 +407,10 @@ public class CraftEventFactory {
creeper.getBukkitEntity().getServer().getPluginManager().callEvent(event);
return event;
}
public static EntityTargetEvent callEntityTargetEvent(Entity entity, Entity target, EntityTargetEvent.TargetReason reason) {
EntityTargetEvent event = new EntityTargetEvent(entity.getBukkitEntity(), target.getBukkitEntity(), reason);
entity.getBukkitEntity().getServer().getPluginManager().callEvent(event);
return event;
}
}