Interface ProjectileHitEvent

All Superinterfaces:
Cancellable, Event

public interface ProjectileHitEvent extends Event, Cancellable
Fired when a projectile hits an entity or a block. Cancelling it lets the projectile fly on as if it had hit nothing.
Since:
0.1.0
  • Method Details

    • projectile

      Projectile projectile()
      Returns the projectile.
      Returns:
      the projectile
      Since:
      0.1.0
    • hitEntity

      @Nullable Entity hitEntity()
      Returns the entity hit, or null when a block was hit.
      Returns:
      the entity hit, or null when a block was hit
      Since:
      0.1.0
    • hitBlock

      Returns the block hit, or null when an entity was hit.
      Returns:
      the block hit, or null when an entity was hit
      Since:
      0.1.0