Solved Get Projectile and Launcher?

Discussion in 'Plugin Development' started by Zidkon, Oct 7, 2012.

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

    Zidkon

    I know is a dumb question but I have never used ProjectileLaunchEvent and I don't really understand the Class Reference at jd.bukkit.org.

    How do I get what Entity is throwing what Projectile?

    Seems that getEntity() method returns a Projectile object, but I don't see how to get the entity who throws the projectile itself.

    Or maybe I'm looking for the wrong event? The main idea is to get when a player is throwing eggs, snowballs, ender pearls, or splash potions.

    Any help ? Really appreciated :)
     
  2. Offline

    Courier

  3. Offline

    makskay

    You can get the entity responsible for launching a given Projectile via Projectile.getShooter().
     
    Zidkon likes this.
  4. Offline

    Zidkon

    Thank you, all I needed ;)
     
Thread Status:
Not open for further replies.

Share This Page