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:
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user