mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 17:05:20 +01:00
Check current character index
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user