EntityShootBowEvent

Discussion in 'Bukkit Preview' started by Zeerix, Jan 17, 2012.

  1. Offline

    Zeerix

    This adds the EntityShootBowEvent, which is triggered when either a player releases a pulled bow, or when a Skeleton shoots an arrow.

    Outline:
    Code:
    class EntityShootBowEvent extends EntityEvent implements Cancellable {
        public Entity getEntity();     // returns shooter of the arrow
        public ItemStack getBow();     // returns the 'bow' item which was used to shoot, or null
        public Entity getProjectile(); // returns the arrow entity which is about to be launched
        public float getForce();       // returns the strength of the shooting; this is between 0.1 and 1.0, depending on the bow pulling time
    
        public void setProjectile(Entity projectile); // this allows to change the projectile which will be launched (can be null)
    }
    
    JavaDoc: EntityShootBowEvent
    Bukkit commit: https://github.com/Bukkit/Bukkit/commit/d57776f058520cd38f5ba39831d1d53b59942211
     
    mushroomhostage, r3Fuze and Jaker232 like this.

Share This Page