2021-11-16 00:08:50 +01:00
|
|
|
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/craftbukkit/scoreboard/CraftScore.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
2024-01-14 10:46:04 +01:00
|
|
|
index 29e24461e29e4cf3d31497198debcde18761ad73..ceb1a39c02c3cfa7632a0fdca414c7046888fcb1 100644
|
2021-11-16 00:08:50 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
2024-01-14 10:46:04 +01:00
|
|
|
@@ -66,4 +66,12 @@ final class CraftScore implements Score {
|
2021-11-16 00:08:50 +01:00
|
|
|
public CraftScoreboard getScoreboard() {
|
|
|
|
return this.objective.getScoreboard();
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public void resetScore() {
|
|
|
|
+ Scoreboard board = this.objective.checkState().board;
|
2023-12-06 20:10:59 +01:00
|
|
|
+ board.resetSinglePlayerScore(entry, this.objective.getHandle());
|
2021-11-16 00:08:50 +01:00
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|