mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
Improve calling of ProjectileHitEvent. Fixes BUKKIT-3872
By: Andre LeBlanc <andre@norcode.com>
This commit is contained in:
parent
10245ce119
commit
3c6a12547b
@ -532,6 +532,12 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
public static ProjectileHitEvent callProjectileHitEvent(Entity entity) {
|
||||
ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity());
|
||||
entity.world.getServer().getPluginManager().callEvent(event);
|
||||
return event;
|
||||
}
|
||||
|
||||
public static ExpBottleEvent callExpBottleEvent(Entity entity, int exp) {
|
||||
ThrownExpBottle bottle = (ThrownExpBottle) entity.getBukkitEntity();
|
||||
ExpBottleEvent event = new ExpBottleEvent(bottle, exp);
|
||||
|
Loading…
Reference in New Issue
Block a user