How to detect player in OnProjectileHit?

Discussion in 'Spigot Plugin Development' started by Orangemaster123, May 28, 2017.

Thread Status:
Not open for further replies.
  1. Im currently working in a OnProjectileHit event and i need to find the players coordinates, but i can't do this as i dont know who to detect the player in this event.

    Does anyone know how i'll be able to do this?
     
  2. If you want the target players location use:
    getHitEntity()

    If you want the location of the player that fired use:
    getEntity()
     
  3. Don't use OnProjectileHit; Use EntityDamageByEntity
     
    • Agree Agree x 1
Thread Status:
Not open for further replies.