WickedProduction
9/27/2019 - 11:18 PM

Scoreboards in Spigot

            Player player = (Player) sender;
            ScoreboardManager manager = Bukkit.getScoreboardManager();
            Scoreboard scoreboard = manager.getNewScoreboard();

            Objective objective = scoreboard.registerNewObjective("Title", "dummy");
            objective.setDisplaySlot(DisplaySlot.SIDEBAR);
            objective.setDisplayName(ChatColor.BLUE + "Scoreboard Title");

            Score score = objective.getScore(ChatColor.GOLD + "Money: $" + ChatColor.GREEN + 1); //create a line for the board
            Score s2 = objective.getScore(""); //blank space
            Score s3 = objective.getScore(ChatColor.DARK_PURPLE + "https://google.com");

            score.setScore(3);
            s2.setScore(2);
            s3.setScore(1);

            player.setScoreboard(scoreboard);