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

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