Only check the TeamColor of active objectives

This commit is contained in:
Tim203 2021-10-20 12:53:09 +02:00
parent 483a336b8a
commit 582da8b88a
No known key found for this signature in database
GPG Key ID: 064EE9F5BF7C3EE8
1 changed files with 7 additions and 0 deletions

View File

@ -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;
}