package net.glowstone.scoreboard;

import net.glowstone.net.message.play.scoreboard.ScoreboardScoreMessage;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.scoreboard.Objective;
import org.bukkit.scoreboard.Score;
import org.bukkit.scoreboard.Scoreboard;

/**
 * Implementation/data holder for Scores.
 */
public final class GlowScore implements Score {

    private final GlowObjective objective;
    private final String entry;
    private int score;
    private boolean locked;

    public GlowScore(GlowObjective objective, String entry) {
        this.objective = objective;
        this.entry = entry;
    }

    public Objective getObjective() {
        return objective;
    }

    public Scoreboard getScoreboard() {
        return objective.getScoreboard();
    }

    public String getEntry() {
        return entry;
    }

    @Deprecated
    public OfflinePlayer getPlayer() {
        return Bukkit.getOfflinePlayer(entry);
    }

    public int getScore() throws IllegalStateException {
        objective.checkValid();
        return score;
    }

    public void setScore(int score) throws IllegalStateException {
        objective.checkValid();
        this.score = score;
        objective.getScoreboard()
            .broadcast(new ScoreboardScoreMessage(entry, objective.getName(), score));
    }

    @Override
    public boolean isScoreSet() throws IllegalStateException {
        objective.checkValid();
        return objective.getScoreboard().getScores(entry).contains(this);
    }

    public boolean getLocked() {
        return locked;
    }

    public void setLocked(boolean locked) {
        this.locked = locked;
    }
}

@@ -629,32 +629,46 @@
 = entry;%0A    %7D%0A%0A
+    @Override%0A
     public Objec
@@ -685,24 +685,24 @@
 jective() %7B%0A
-
         retu
@@ -714,32 +714,46 @@
 jective;%0A    %7D%0A%0A
+    @Override%0A
     public Score
@@ -817,32 +817,46 @@
 board();%0A    %7D%0A%0A
+    @Override%0A
     public Strin
@@ -895,24 +895,38 @@
 try;%0A    %7D%0A%0A
+    @Override%0A
     @Depreca
@@ -1014,32 +1014,46 @@
 (entry);%0A    %7D%0A%0A
+    @Override%0A
     public int g
@@ -1146,32 +1146,216 @@
 n score;%0A    %7D%0A%0A
+    /**%0A     * Sets this score's value.%0A     * @param score the new value%0A     * @throws IllegalStateException if the objective is not registered on a scoreboard%0A     */%0A    @Override%0A
     public void 

Fix CheckStyle issues in scoreboard/GlowScore.java (#767)