Dieing at the Same Time

Discussion in 'Plugin Development' started by number1_Master, Sep 22, 2012.

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

    number1_Master

    I have a plugin on my server which allows a player to duel another player in an arena. Whichever players wins has 10 seconds to recover the items and afterward is teleported out of the arena. There has been a few coincidences where both players have died at the same time.

    Is there a way to check if two players have died at the same time? I assume I wold need to use HashMaps.
     
  2. Offline

    Jnorr44

    if (player1.isDead() && player2.isDead()){
    //dop something
    }
    ???
     
  3. Offline

    number1_Master

    hmmm

    Well since my code acts under the DeathEvent, I can simply put if(player1.isDead) or if(player2.isDead)
    I'll try it out. Thanks!
     
  4. Offline

    Fl1pzta

    Check if player died from another player. Then check if that player is dead.
     
  5. Offline

    number1_Master

    You mean:
    If you read up, then you will see that is what I said.
     
  6. Offline

    Fl1pzta

    Well, if you wanted to get specific you could make sure player 1 died from another player or his "matched" player.
     
  7. Offline

    number1_Master

    That is what Jnorr44, you, and I have said ...
     
Thread Status:
Not open for further replies.

Share This Page