+ * Called when an projectile collides with an entity
+ * <p>
+ * This event is called <b>before</b> {@link org.bukkit.event.entity.EntityDamageByEntityEvent}, and cancelling it will allow the projectile to continue flying
+ */
+public class ProjectileCollideEvent extends EntityEvent implements Cancellable {
+ private final Entity collidedWith;
+
+ /**
+ * Get the entity the projectile collided with
+ *
+ * @return the entity collided with
+ */
+ public Entity getCollidedWith() {
+ return collidedWith;
+ }
+
+ public ProjectileCollideEvent(Projectile what, Entity collidedWith) {
+ super(what);
+ this.collidedWith = collidedWith;
+ }
+
+ /**
+ * Get the projectile that collided
+ *
+ * @return the projectile that collided
+ */
+ public Projectile getEntity() {
+ return (Projectile) super.getEntity();
+ }
+
+ private static final HandlerList handlerList = new HandlerList();