Answers for "scoreboard bukkit"

2

bukkit scoreboard

ScoreboardManager manager = Bukkit.getScoreboardManager();
Scoreboard board = manager.getNewScoreboard();
Objective objective = board.registerNewObjective("test", "dummy");

    //Setting where to display the scoreboard/objective (either SIDEBAR, PLAYER_LIST or BELOW_NAME)
    objective.setDisplaySlot(DisplaySlot.SIDEBAR);
     
    //Setting the display name of the scoreboard/objective
    objective.setDisplayName("Display Name");

    Score score = objective.getScore(ChatColor.GREEN + "Kills:"); //Get a fake offline player
    score.setScore(1);
Posted by: Guest on February-17-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language