+ Added way to change scoreboard title.

This commit is contained in:
Steffion 2013-09-22 15:53:30 +02:00
parent 9e99d6d450
commit 197e647ece
2 changed files with 5 additions and 2 deletions

View File

@ -82,6 +82,7 @@ public enum ConfigC {
"%A%arenaname%", "%A%players%%N/%A%maxplayers%",
"%EIngame: %A%timeleft%" }, W.config),
scoreboard_title ("[" + BlockHunt.pdfFile.getName() + "]", W.config),
scoreboard_timeleft ("%ATime left:", W.config),
scoreboard_seekers ("%NSeekers:", W.config),
scoreboard_hiders ("%NHiders:", W.config),

View File

@ -20,7 +20,8 @@ public class ScoreboardHandler {
Objective object = board.registerNewObjective(arena.arenaName, "dummy");
object.setDisplaySlot(DisplaySlot.SIDEBAR);
object.setDisplayName(MessageM.replaceAll(MessageM.CType.TAG()));
object.setDisplayName(MessageM.replaceAll((String) W.config
.get(ConfigC.scoreboard_title)));
Score timeleft = object
.getScore(Bukkit.getOfflinePlayer(MessageM
.replaceAll((String) W.config
@ -49,7 +50,8 @@ public class ScoreboardHandler {
public static void updateScoreboard(Arena arena) {
Scoreboard board = arena.scoreboard;
Objective object = board.getObjective(DisplaySlot.SIDEBAR);
object.setDisplayName(MessageM.replaceAll(MessageM.CType.TAG()));
object.setDisplayName(MessageM.replaceAll((String) W.config
.get(ConfigC.scoreboard_title)));
Score timeleft = object
.getScore(Bukkit.getOfflinePlayer(MessageM
.replaceAll((String) W.config