Add Score.isScoreSet()Z API.

This commit is contained in:
md_5 2017-11-10 10:50:58 +11:00
parent 353964045a
commit 25959fab20

View file

@ -56,6 +56,13 @@ final class CraftScore implements Score {
objective.checkState().board.getPlayerScoreForObjective(entry, objective.getHandle()).setScore(score);
}
@Override
public boolean isScoreSet() throws IllegalStateException {
Scoreboard board = objective.checkState().board;
return board.getPlayers().contains(entry) && board.getPlayerObjectives(entry).containsKey(objective.getHandle());
}
public CraftScoreboard getScoreboard() {
return objective.getScoreboard();
}