From fbce8f41cc236e78e55f938cdf8412dcb28254e3 Mon Sep 17 00:00:00 2001 From: booky10 Date: Fri, 5 Nov 2021 21:01:36 +0100 Subject: [PATCH] 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. --- .../src/main/java/org/bukkit/scoreboard/Score.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/scoreboard/Score.java b/paper-api/src/main/java/org/bukkit/scoreboard/Score.java index 787bb91b48..48a1654a2d 100644 --- a/paper-api/src/main/java/org/bukkit/scoreboard/Score.java +++ b/paper-api/src/main/java/org/bukkit/scoreboard/Score.java @@ -73,4 +73,14 @@ public interface Score { */ @Nullable Scoreboard getScoreboard(); + + // Paper start + /** + * Resets this score, if a value has been set. + * + * @throws IllegalStateException if the associated objective has been + * unregistered + */ + void resetScore() throws IllegalStateException; + // Paper end }