From 1647ef4fae54177ed24f2dc4c4bae9d1a266fc97 Mon Sep 17 00:00:00 2001 From: GJ Date: Wed, 17 Jul 2013 08:18:54 -0400 Subject: [PATCH] Fixed issue where locale strings could cause the scoreboard header to be longer than 16 characters. Fixes #1278 --- Changelog.txt | 1 + .../gmail/nossr50/util/scoreboards/ScoreboardManager.java | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 759e8b84e..56d95a0e4 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -10,6 +10,7 @@ Key: Version 1.4.07-dev + Added snow to excavation = Fixed bug with Skull Splitter not finding the locale string + = Fixed issue where locale strings could cause the scoreboard header to be longer than 16 characters. ! Improved profile saving ! Updated localization files 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 2198c7714..e9bdb3efc 100644 --- a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java +++ b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java @@ -29,10 +29,10 @@ public class ScoreboardManager { private static final Map PLAYER_SCOREBOARDS = new HashMap(); private static final Scoreboard GLOBAL_STATS_SCOREBOARD = mcMMO.p.getServer().getScoreboardManager().getNewScoreboard(); - private final static String PLAYER_STATS_HEADER = LocaleLoader.getString("Scoreboard.Header.PlayerStats"); - private final static String PLAYER_RANK_HEADER = LocaleLoader.getString("Scoreboard.Header.PlayerRank"); - private final static String PLAYER_INSPECT_HEADER = LocaleLoader.getString("Scoreboard.Header.PlayerInspect"); - private final static String POWER_LEVEL_HEADER = LocaleLoader.getString("Scoreboard.Header.PowerLevel"); + private final static String PLAYER_STATS_HEADER = LocaleLoader.getString("Scoreboard.Header.PlayerStats").substring(0, 16); + private final static String PLAYER_RANK_HEADER = LocaleLoader.getString("Scoreboard.Header.PlayerRank").substring(0, 16); + private final static String PLAYER_INSPECT_HEADER = LocaleLoader.getString("Scoreboard.Header.PlayerInspect").substring(0, 16); + private final static String POWER_LEVEL_HEADER = LocaleLoader.getString("Scoreboard.Header.PowerLevel").substring(0, 16); private final static String POWER_LEVEL = LocaleLoader.getString("Scoreboard.Misc.PowerLevel"); private final static String LEVEL = LocaleLoader.getString("Scoreboard.Misc.Level");