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

By: ZNickq <ZNickq@ZNickq-PC>
This commit is contained in:
CraftBukkit/Spigot 2012-02-25 14:58:21 +02:00
parent 8f6cf890e0
commit 27ab478e59

View file

@ -407,4 +407,10 @@ public class CraftEventFactory {
creeper.getBukkitEntity().getServer().getPluginManager().callEvent(event); creeper.getBukkitEntity().getServer().getPluginManager().callEvent(event);
return 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;
}
} }