ProjectileHitEvent hit type

Discussion in 'Plugin Development' started by victor2748, Oct 12, 2014.

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

    victor2748

    Hey guys, I have this problem. I am listening to ProjectileHitEvent, and I want to check, if that projectile hit an entity, or a block. I did some research, but couldn't find how to do this. Could you please help?

    Thanks, Victor.
     
  2. Offline

    mine-care

    when it hits a block, projectileHitEvent is called. when it hits an entity, the EntityDamageEvent is called. then you check if the damager is a projectile and boom. :)
     
    victor2748 and xTrollxDudex like this.
  3. Offline

    victor2748

    Thanks, but projectilehitevent is called when a projectile hits an entity too. How do I make sure that it hits a block?
     
  4. Offline

    mine-care

    is it? i thought it only fires on block then get its direction to get location on front and check if its block
     
Thread Status:
Not open for further replies.

Share This Page