Paper/patches/api/0328-Add-API-for-resetting-a-single-score.patch
Jake Potrebic 5730a94208
Updated Upstream (Bukkit/CraftBukkit) (#8991)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2b4582fb SPIGOT-5916: getLastColors does not work with the rgb colors

CraftBukkit Changes:
f7707086d SPIGOT-7299: Fix indirect/anvil damage events and minor improvements
2023-03-18 10:05:04 -07:00

27 lines
991 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: booky10 <boooky10@gmail.com>
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.
diff --git a/src/main/java/org/bukkit/scoreboard/Score.java b/src/main/java/org/bukkit/scoreboard/Score.java
index d25b4d04932da7e7562cd1acf67ebec33af5b6ef..07bfad4a908de26e9aa6291e4ad20006e88ffe87 100644
--- a/src/main/java/org/bukkit/scoreboard/Score.java
+++ b/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
}