mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-27 04:55:25 +01:00
Keep dead players on scoreboards, but make them gray.
This commit is contained in:
parent
bd1e1b879e
commit
0182132337
@ -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:
|
||||
|
@ -654,6 +654,7 @@ public class ArenaImpl implements Arena
|
||||
if (arenaPlayers.contains(p)) {
|
||||
unmount(p);
|
||||
clearInv(p);
|
||||
scoreboard.death(p);
|
||||
}
|
||||
|
||||
removeClassPermissions(p);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user