mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 12:41:50 +01:00
Add Score.isScoreSet()Z API.
This commit is contained in:
parent
353964045a
commit
25959fab20
1 changed files with 7 additions and 0 deletions
|
@ -56,6 +56,13 @@ final class CraftScore implements Score {
|
||||||
objective.checkState().board.getPlayerScoreForObjective(entry, objective.getHandle()).setScore(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() {
|
public CraftScoreboard getScoreboard() {
|
||||||
return objective.getScoreboard();
|
return objective.getScoreboard();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue