Check current character index

This commit is contained in:
KingRainbow44
2023-04-30 00:30:03 -04:00
parent 9b507a6ec3
commit 48dd1685a2

View File

@@ -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);
}