From f462fe9218e76e55ea99e8d8ca7699c0e4e58f28 Mon Sep 17 00:00:00 2001 From: fullwall Date: Wed, 13 Jul 2022 20:10:42 +0800 Subject: [PATCH] Add null check --- main/src/main/java/net/citizensnpcs/trait/ScoreboardTrait.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/src/main/java/net/citizensnpcs/trait/ScoreboardTrait.java b/main/src/main/java/net/citizensnpcs/trait/ScoreboardTrait.java index 191019746..2450ab025 100644 --- a/main/src/main/java/net/citizensnpcs/trait/ScoreboardTrait.java +++ b/main/src/main/java/net/citizensnpcs/trait/ScoreboardTrait.java @@ -37,6 +37,8 @@ public class ScoreboardTrait extends Trait { public void apply(boolean nameVisibility) { Team team = getTeam(); + if (team == null) + return; if (!Setting.USE_SCOREBOARD_TEAMS.asBoolean()) { team.unregister();