diff --git a/src/main/java/emu/grasscutter/game/player/TeamInfo.java b/src/main/java/emu/grasscutter/game/player/TeamInfo.java index fad4ee4c6..516abe766 100644 --- a/src/main/java/emu/grasscutter/game/player/TeamInfo.java +++ b/src/main/java/emu/grasscutter/game/player/TeamInfo.java @@ -1,12 +1,12 @@ package emu.grasscutter.game.player; -import static emu.grasscutter.config.Configuration.GAME_OPTIONS; - import dev.morphia.annotations.Entity; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.net.proto.AvatarTeamOuterClass.AvatarTeam; -import java.util.ArrayList; -import java.util.List; + +import java.util.*; + +import static emu.grasscutter.config.Configuration.GAME_OPTIONS; @Entity public final class TeamInfo { @@ -87,6 +87,8 @@ public final class TeamInfo { for (int i = 0; i < this.getAvatars().size(); i++) { Avatar avatar = player.getAvatars().getAvatarById(this.getAvatars().get(i)); + if (avatar == null) continue; + avatarTeam.addAvatarGuidList(avatar.getGuid()); }