From 2ec3448bdfc94c56235e7faa5a298e7c712bd983 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 10 Nov 2017 10:50:52 +1100 Subject: [PATCH] Add Score.isScoreSet()Z API. By: md_5 --- paper-api/src/main/java/org/bukkit/scoreboard/Score.java | 9 +++++++++ 1 file changed, 9 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 4c1034688c..f7b86b4030 100644 --- a/paper-api/src/main/java/org/bukkit/scoreboard/Score.java +++ b/paper-api/src/main/java/org/bukkit/scoreboard/Score.java @@ -51,6 +51,15 @@ public interface Score { */ void setScore(int score) throws IllegalStateException; + /** + * Shows if this score has been set at any point in time. + * + * @return if this score has been set before + * @throws IllegalStateException if the associated objective has been + * unregistered + */ + boolean isScoreSet() throws IllegalStateException; + /** * Gets the scoreboard for the associated objective. *