From 55910ca4663f7caf519728a5558b93b053a2123c Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Sun, 14 Jul 2024 11:46:51 -0500 Subject: [PATCH] Fix NPE --- .../org/battleplugins/arena/module/teamcolors/TeamColors.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/team-colors/src/main/java/org/battleplugins/arena/module/teamcolors/TeamColors.java b/module/team-colors/src/main/java/org/battleplugins/arena/module/teamcolors/TeamColors.java index 72cb52fd..3068462a 100644 --- a/module/team-colors/src/main/java/org/battleplugins/arena/module/teamcolors/TeamColors.java +++ b/module/team-colors/src/main/java/org/battleplugins/arena/module/teamcolors/TeamColors.java @@ -39,7 +39,7 @@ public void onJoin(ArenaJoinEvent event) { for (ArenaTeam team : event.getCompetition().getTeamManager().getTeams()) { // Register a new Bukkit team for each team in the competition Team bukkitTeam = event.getPlayer().getScoreboard().getTeam("ba-" + team.getName()); - if (bukkitTeam != null) { + if (bukkitTeam == null) { bukkitTeam = event.getPlayer().getScoreboard().registerNewTeam("ba-" + team.getName()); bukkitTeam.displayName(team.getFormattedName()); bukkitTeam.color(NamedTextColor.nearestTo(team.getTextColor()));