mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
Add API for resetting a single score
It was only possible to reset all scores for a specific entry, instead of resetting only specific scores.
This commit is contained in:
@@ -66,4 +66,12 @@ final class CraftScore implements Score {
|
|||||||
public CraftScoreboard getScoreboard() {
|
public CraftScoreboard getScoreboard() {
|
||||||
return this.objective.getScoreboard();
|
return this.objective.getScoreboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Paper start
|
||||||
|
@Override
|
||||||
|
public void resetScore() {
|
||||||
|
Scoreboard board = this.objective.checkState().board;
|
||||||
|
board.resetSinglePlayerScore(entry, this.objective.getHandle());
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user