diff --git a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java index f365f5752..a89f3853f 100644 --- a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java +++ b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java @@ -278,6 +278,10 @@ public class ScoreboardManager { String playerName = stat.get(1); playerName = (playerName.equals(player.getName()) ? ChatColor.GOLD : "") + playerName; + if (playerName.length() > 16) { + playerName = playerName.substring(0, 16); + } + objective.getScore(server.getOfflinePlayer(playerName)).setScore(Integer.valueOf(stat.get(0))); } } @@ -286,6 +290,10 @@ public class ScoreboardManager { String playerName = stat.name; playerName = (playerName.equals(player.getName()) ? ChatColor.GOLD : "") + playerName; + if (playerName.length() > 16) { + playerName = playerName.substring(0, 16); + } + objective.getScore(server.getOfflinePlayer(playerName)).setScore(stat.statVal); } }