What Event Would I Use?

Discussion in 'Plugin Development' started by mkezar, Jan 21, 2015.

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

    mkezar

    Hey. I am trying to capture an event that when for example, during pvp, when a player is hitting another player then something will happen. Would i use playerInteractEvent or entityDamageByEntityEvent? i checked the javadocs and im still not sure which one. Please help! :D thanks :D
     
  2. Offline

    SuchSwegMuchWow

    @mkezar

    Use EntityDamageByEntityEvent.
     
  3. Offline

    mkezar

    PlayerInteractEntityEvent not PlayerInteractEvent

    thank u :D

    and 1 more question, on the javadocs it says you would use getDamager() to get the damager of course, but how would i get the defender? getDefender()? or is that not a correct method?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 13, 2016
  4. Offline

    SuchSwegMuchWow

    GrandmaJam and 1Rogue like this.
Thread Status:
Not open for further replies.

Share This Page