From 50896a24e77844e94b386b912e6c27444bc4777f Mon Sep 17 00:00:00 2001 From: Tim203 Date: Thu, 30 Sep 2021 23:04:32 +0200 Subject: [PATCH] Documented the if statement introduced in the previous commit --- .../java/org/geysermc/connector/scoreboard/Scoreboard.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/scoreboard/Scoreboard.java b/connector/src/main/java/org/geysermc/connector/scoreboard/Scoreboard.java index 9b2417c16..199cf7ed2 100644 --- a/connector/src/main/java/org/geysermc/connector/scoreboard/Scoreboard.java +++ b/connector/src/main/java/org/geysermc/connector/scoreboard/Scoreboard.java @@ -258,8 +258,10 @@ public final class Scoreboard { addScores.add(score.getCachedInfo()); } - // we need this as long as MCPE-143063 hasn't been fixed - if (add && score.getUpdateType() != ADD && !objectiveUpdate) { + // we need this as long as MCPE-143063 hasn't been fixed. + // the checks after 'add' are there to prevent removing scores that + // are going to be removed anyway / don't need to be removed + if (add && score.getUpdateType() != ADD && !(objectiveUpdate || objectiveAdd)) { removeScores.add(score.getCachedInfo()); }