Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
41647af74c
We cannot put blocking network I/O onto the worldgen threads, this will crash the server if it stalls
25 Zeilen
1.0 KiB
Diff
25 Zeilen
1.0 KiB
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/craftbukkit/scoreboard/CraftScore.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
|
index 2c4ffed5e828f051c44f494a8ed599a8197d7450..3b26793b67282c3a20c023b9c13a2a9b54d5d932 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
|
@@ -68,4 +68,12 @@ final class CraftScore implements Score {
|
|
public CraftScoreboard getScoreboard() {
|
|
return this.objective.getScoreboard();
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public void resetScore() {
|
|
+ Scoreboard board = this.objective.checkState().board;
|
|
+ board.resetPlayerScore(entry, this.objective.getHandle());
|
|
+ }
|
|
+ // Paper end
|
|
}
|