Improve calling of ProjectileHitEvent. Fixes BUKKIT-3872

This commit is contained in:
Andre LeBlanc authored and GJ committed 2013-03-26 07:13:14 -04:00
1 parent 45d3e2514d
commit 08f3df82eb
5 files changed
+10 -15

No files matched your search

@@ -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);