Getting player with 0 deaths

Discussion in 'Plugin Development' started by epickillerpigz, Oct 1, 2013.

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

    epickillerpigz

    Hi,
    I'm working on a minigame plugin. I was wondering if you knew an efficient way to see if only 1 player hasn't died, and get that player so I can broadcast their name, give them a prize, etc.

    Basically, get the last man standing.

    Thanks!
    Epickillerpigz
     
  2. Offline

    Plo124

    epickillerpigz Store a HashMap of the players in the minigame, and then listen to the death event, and eliminate them from the list, and also check if there is only 1 left, and then that 1 is the one you asked for.
     
    tommycake50, se1by and MrSnare like this.
  3. Offline

    epickillerpigz

    Plo124
    Thanks, I'll try this.
     
Thread Status:
Not open for further replies.

Share This Page