diff --git a/src/main/java/emu/grasscutter/game/player/TeamManager.java b/src/main/java/emu/grasscutter/game/player/TeamManager.java index e10bcc69e..111478e18 100644 --- a/src/main/java/emu/grasscutter/game/player/TeamManager.java +++ b/src/main/java/emu/grasscutter/game/player/TeamManager.java @@ -132,6 +132,10 @@ public final class TeamManager extends BasePlayerDataManager { } public EntityAvatar getCurrentAvatarEntity() { + if (this.currentCharacterIndex >= this.getActiveTeam().size()) { + this.currentCharacterIndex = 0; // Reset to the first character. + } + return this.getActiveTeam().get(this.currentCharacterIndex); }