mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
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:
parent
8f6cf890e0
commit
27ab478e59
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue