Interface EntityShootProjectileEvent

All Superinterfaces:
Cancellable, Event

public interface EntityShootProjectileEvent extends Event, Cancellable
Fired when an entity shoots or throws a projectile with an item, such as an arrow with a bow or a crossbow, or a trident, before the projectile enters the world. Cancelling it keeps the projectile out of the world, and the item and its ammunition untouched.
Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns how hard the projectile is shot, between 0 and 1.
    Returns the projectile about to enter the world.
    Returns the entity shooting.
    Returns the item shooting the projectile: the bow, the crossbow or the trident.

    Methods inherited from interface Cancellable

    isCancelled, setCancelled
  • Method Details

    • shooter

      LivingEntity shooter()
      Returns the entity shooting.
      Returns:
      the entity shooting
      Since:
      0.1.0
    • weapon

      ItemStack weapon()
      Returns the item shooting the projectile: the bow, the crossbow or the trident.
      Returns:
      the item shooting the projectile: the bow, the crossbow or the trident
      Since:
      0.1.0
    • projectile

      Projectile projectile()
      Returns the projectile about to enter the world.
      Returns:
      the projectile about to enter the world
      Since:
      0.1.0
    • force

      float force()
      Returns how hard the projectile is shot, between 0 and 1.
      Returns:
      how hard the projectile is shot, between 0 and 1
      Since:
      0.1.0