Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Redned235 committed Jul 14, 2024
1 parent f4a51ad commit 55910ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down

0 comments on commit 55910ca

Please sign in to comment.