Solved Scoreboard

Discussion in 'Plugin Development' started by DogeDebugger, Apr 19, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    DogeDebugger

    So i got this:

    Code:
    ScoreboardManager manager = Bukkit.getScoreboardManager();
            Scoreboard board = manager.getNewScoreboard();
            Objective objective = board.registerNewObjective(ChatColor.GOLD + ""
                    + ChatColor.BOLD + "ZvsV", "dummy");
            objective.setDisplaySlot(DisplaySlot.SIDEBAR);
    
            Score score1 = objective.getScore(Bukkit.getOfflinePlayer(ChatColor.RED
                    + "" + ChatColor.BOLD + "Zombie King:" + ChatColor.GREEN));
            Score score2 = objective.getScore(Bukkit
                    .getOfflinePlayer(ChatColor.GREEN + "" + ChatColor.BOLD
                            + "Villager King:" + ChatColor.GREEN));    
    When i do setScore(), how can i make it so the score appears UNDER the objective?
     
  2. @DogeDebugger
    Either by writing some blanks before the score (Not sure if that works), so it moves to the next line, or create a second objective. In the last case you would need to store which ScoreObjective belongs to which real Objective.
     
  3. Offline

    DogeDebugger

    Im interested in how the last one works, examples? :p
     
  4. @DogeDebugger
    Never really did it. Was just an idea of mine. But you could create a HashMap<Objective, Objective> and then place the Objectives in there and instead of changing the score change the name of the objective.
     
Thread Status:
Not open for further replies.

Share This Page