Scoreboard Help

Discussion in 'Plugin Development' started by nbkburns, Jun 30, 2013.

Thread Status:
Not open for further replies.
  1. Offline


    so i have got a scoreboard but it wont show up on my screen [sheep]
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.bukkit.scoreboard.DisplaySlot;
    import org.bukkit.scoreboard.Objective;
    import org.bukkit.scoreboard.Scoreboard;
    import org.bukkit.scoreboard.ScoreboardManager;
    import org.bukkit.scoreboard.Team;
    public class Board extends JavaPlugin implements Listener {
        public static Board instance;
        public String PREFIX = ChatColor.GREEN + "" + ChatColor.BOLD + "Quests" + ChatColor.AQUA;
        public int redScore = 0;
        public int blueScore = 0;
        public int gameTime;
        public boolean isCTF;
        private ScoreboardManager manager = null;
        private Scoreboard        board  = null;
        private Team              Quests    = null;
        private Team              Quest  = null;
        public void onEnable() {
            instance = this;
            manager = Bukkit.getScoreboardManager();
            board  = manager.getNewScoreboard();
            Quests  = board.registerNewTeam("Quests");
            Quest  = board.registerNewTeam("Quest");
            System.out.println("Quests Loading config...");
        public ScoreboardManager getScoreboardManager() {
            return this.manager;
        public Scoreboard getScoreboard() {
            return this.board;
        public Team getTeam(String teamName) {
            if (teamName.equalsIgnoreCase(this.Quests.getName()))
                return this.Quests;
            else if (teamName.equalsIgnoreCase(this.Quest.getName()))
                return this.Quest;
            return null;
        public Team getRedTeam() {
            return this.Quests;
        public Team getBlueTeam() {
            return this.Quest;
    public void onPlayerJoin(PlayerJoinEvent event){
            Player p = event.getPlayer();
        public void showScoreboard(Player player) {
            ScoreboardManager manager = Bukkit.getScoreboardManager();
            Scoreboard board = manager.getNewScoreboard();
            Objective objective = board.registerNewObjective("Quests", "Quest");
            objective.setDisplayName(" §bQuests ");
    there is my code
  2. How about player.setScoreboard(Scoreboard) ? :)
  3. Offline


    where do i put this
  4. I would try it with right after "objective.setDisplayName(" §bQuests ");"
Thread Status:
Not open for further replies.

Share This Page