Keep dead players on scoreboards, but make them gray.

This commit is contained in:
garbagemule 2014-05-01 01:34:10 +02:00
parent bd1e1b879e
commit 0182132337
3 changed files with 11 additions and 1 deletions

View File

@ -1,7 +1,7 @@
name: MobArena
author: garbagemule
main: com.garbagemule.MobArena.MobArena
version: 0.96.4.2
version: 0.96.4.3
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
commands:
ma:

View File

@ -654,6 +654,7 @@ public class ArenaImpl implements Arena
if (arenaPlayers.contains(p)) {
unmount(p);
clearInv(p);
scoreboard.death(p);
}
removeClassPermissions(p);

View File

@ -62,7 +62,16 @@ public class ScoreboardManager {
* @param player a player
*/
void death(Player player) {
String name = ChatColor.GRAY + player.getName();
if (name.length() > 16) {
name = name.substring(0, 15);
}
int value = kills.getScore(player).getScore();
scoreboard.resetScores(player);
Score fake = kills.getScore(Bukkit.getOfflinePlayer(name));
fake.setScore(value);
}
/**