📜  bukkit 记分牌 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:42.933000             🧑  作者: Mango

代码示例1
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);