Solved Who launched the projectile?

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

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

    civ77

    How would I get the entity launching a projectile as opposed to the entity being launched?
     
  2. Offline

    Vandrake

    ProjectileHitEVent
    e.getProjectile().getShooter() or something.
     
  3. Alternatively, in EntityDamageByEntityEvent, event.getDamager() will return a Projectile. After casting, you can call .getShooter() as well.
     
  4. But make sure that getShooter() is not null, cause dispensers and other plugins will fire arrows without a entity.
     
  5. Offline

    civ77

    thanks
     
Thread Status:
Not open for further replies.

Share This Page