Projectile Throw event

Discussion in 'Plugin Development' started by lol768, Nov 3, 2012.

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

    lol768

    Is there one? I want to detect when a player throws a snowball. Should I just use the player interact event and check if they're right clicking the air?
     
  2. Offline

    one4me

    There's the ProjectileLaunchEvent.
    Code:
    @EventHandler
    public void onProjectileThrownEvent(ProjectileLaunchEvent event) {
      if(event.getEntity() instanceof Snowball) {
        //Snowball was thrown
      }
    }
    
    Did you mean to post this in the plugin development area?
     
  3. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

  4. Offline

    lol768

    Sorry, I forgot which forum I was in.

    Sounds good! I'll probably use this one.
     
Thread Status:
Not open for further replies.

Share This Page