java 在Spigot的记分牌
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java 在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);
以上是关于java 在Spigot的记分牌的主要内容,如果未能解决你的问题,请参考以下文章
Spigot MC的部署 及地图插件Dynmap
CraftBukkit好还是Spigot 好
整活实现数字记分牌
整活实现数字记分牌
整活实现数字记分牌
整活实现数字记分牌