diff --git a/resources/plugin.yml b/resources/plugin.yml index dc7da3a..c7e4d59 100644 --- a/resources/plugin.yml +++ b/resources/plugin.yml @@ -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: diff --git a/src/com/garbagemule/MobArena/ArenaImpl.java b/src/com/garbagemule/MobArena/ArenaImpl.java index 64e22c4..a1f3ef9 100644 --- a/src/com/garbagemule/MobArena/ArenaImpl.java +++ b/src/com/garbagemule/MobArena/ArenaImpl.java @@ -654,6 +654,7 @@ public class ArenaImpl implements Arena if (arenaPlayers.contains(p)) { unmount(p); clearInv(p); + scoreboard.death(p); } removeClassPermissions(p); diff --git a/src/com/garbagemule/MobArena/ScoreboardManager.java b/src/com/garbagemule/MobArena/ScoreboardManager.java index 0302342..4244f1a 100644 --- a/src/com/garbagemule/MobArena/ScoreboardManager.java +++ b/src/com/garbagemule/MobArena/ScoreboardManager.java @@ -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); } /**