mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-27 07:34:27 +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() {
|
public EntityAvatar getCurrentAvatarEntity() {
|
||||||
|
if (this.currentCharacterIndex >= this.getActiveTeam().size()) {
|
||||||
|
this.currentCharacterIndex = 0; // Reset to the first character.
|
||||||
|
}
|
||||||
|
|
||||||
return this.getActiveTeam().get(this.currentCharacterIndex);
|
return this.getActiveTeam().get(this.currentCharacterIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user