From 582da8b88a3fa67aaff454ac86e7a8e9d4d49113 Mon Sep 17 00:00:00 2001 From: Tim203 Date: Wed, 20 Oct 2021 12:53:09 +0200 Subject: [PATCH] Only check the TeamColor of active objectives --- .../java/org/geysermc/connector/scoreboard/Scoreboard.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 6f4b540ac..c32353b78 100644 --- a/connector/src/main/java/org/geysermc/connector/scoreboard/Scoreboard.java +++ b/connector/src/main/java/org/geysermc/connector/scoreboard/Scoreboard.java @@ -150,6 +150,13 @@ public final class Scoreboard { continue; } + // there's nothing we can do with inactive objectives + // after checking if the objective has been deleted, + // except waiting for the objective to become activated (: + if (!objective.isActive()) { + continue; + } + if (playerTeam != null && playerTeam.getColor() == objective.getTeamColor()) { correctSidebar = objective; }