Help please.

Discussion in 'Plugin Development' started by A4Papers, Jun 13, 2014.

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

    A4Papers

    What would be the best way to check if a player is in a pvp fight?

    Thanks
     
  2. Offline

    Konkz

    Make an ArrayList with players UUID, add them to it if they are in a fight (EntityDamageByEntityEvent) and then
    after X seconds remove them. You can use a HashMap<UUID, Long> for cooldown. I will leave the research to you.
     
    Code0 likes this.
  3. Offline

    A4Papers

    Konkz I don't think I explained my question very well. What would be needed to check if <player> has hit <player1>.

    Also thanks for the reply that will help with what I'm attempting to do.
     
  4. Offline

    Konkz

    Like I said, EntityDamageByEntityEvent - check the entity getting damaged and check the damager.
     
Thread Status:
Not open for further replies.

Share This Page