World#spawnArrow() damage ender dragon?

Discussion in 'Plugin Development' started by DS_STORE, Feb 6, 2016.

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

    DS_STORE

    Is there a way to damage the ender dragon using the spawnArror arrows?
    And how do I adjust the damage they do?
     
  2. You could store a Metadata Value on the arrow to recognize it, then onEntityDamageByEntity check if the Entity isntance of EnderDragon and check if the Damager is instanceof an Arrow, then check if the Arrow have the Metadata Value that we set before, so now you can set the damage and everything.
     
  3. Offline

    DS_STORE

    Thanks. But I ment it like damage in general terms. Like hitting sheeps or other players.
     
  4. Then just remove the first check.
     
  5. Offline

    DS_STORE

    That works fine.
    Problem: EnderDragon does not get damage at all so the DamageEntityByEntityEvent is not called.
     
Thread Status:
Not open for further replies.

Share This Page