diff options
author | Andre LeBlanc <andre@norcode.com> | 2013-03-23 12:16:00 -0400 |
---|---|---|
committer | GJ <gjmcferrin@gmail.com> | 2013-03-26 07:13:14 -0400 |
commit | 08f3df82eb4a6002fc2d7972dfb9a09243bf7bbb (patch) | |
tree | e3b39591166d5642b7c2f084f16eb872ba768cee /src/main/java/org | |
parent | 45d3e2514dc3dbe6d7b103cc19fe945111263bb7 (diff) | |
download | craftbukkit-08f3df82eb4a6002fc2d7972dfb9a09243bf7bbb.tar craftbukkit-08f3df82eb4a6002fc2d7972dfb9a09243bf7bbb.tar.gz craftbukkit-08f3df82eb4a6002fc2d7972dfb9a09243bf7bbb.tar.lz craftbukkit-08f3df82eb4a6002fc2d7972dfb9a09243bf7bbb.tar.xz craftbukkit-08f3df82eb4a6002fc2d7972dfb9a09243bf7bbb.zip |
Improve calling of ProjectileHitEvent. Fixes BUKKIT-3872
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 34942327..f65b7f85 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -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); |