Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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);
Source by bukkit.org #
 
PREVIOUS NEXT
Tagged: #bukkit #scoreboard
ADD COMMENT
Topic
Name
5+8 =