mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 04:57:18 +00:00
Check current character index
This commit is contained in:
parent
9b507a6ec3
commit
48dd1685a2
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user