Getting when a player launches an arrow (listener)

Discussion in 'Plugin Development' started by orange451, Aug 30, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    orange451

    I cannot seem to find the correct listener for when a player releases the right mouse button (releasing an arrow from a bow). It appears the PlayerInteractEvent does nothing, as does the PlayerUnleashEntityEvent, and the PlayerEggThrowEvent.

    Would anyone happen to know which event is fired when a player shoots an arrow from a bow?
     
  2. orange451
    EntityShootBowEvent and ProjectileLaunchEvent, both work.
     
  3. Offline

    orange451

    How could I have missed those...
    Thank you, sir.
     
  4. Offline

    FireBreath14

    Code:
    public void myMethod(EntityShootBowEvent e){
      if(e.getEntity() instanceof Player){
        //whatever you want to do
      }
    }
     
Thread Status:
Not open for further replies.

Share This Page