Remove dead players from scoreboards.

This commit is contained in:
garbagemule 2014-04-27 00:00:53 +02:00
parent aa77255b18
commit bd1e1b879e
2 changed files with 9 additions and 0 deletions

View File

@ -461,6 +461,7 @@ public class ArenaListener
Messenger.announce(arena, event.getDeathMessage());
}
event.setDeathMessage(null);
arena.getScoreboard().death(player);
arena.playerDeath(player);
} else if (arena.inSpec(player)) {
event.getDrops().clear();

View File

@ -56,6 +56,14 @@ public class ScoreboardManager {
Score score = kills.getScore(player);
score.setScore(score.getScore() + 1);
}
/**
* Signal a player death.
* @param player a player
*/
void death(Player player) {
scoreboard.resetScores(player);
}
/**
* Update the scoreboard to display the given wave number.