mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-14 16:04:40 +01:00
Optimize GetOnlinePlayerListRsp
This commit is contained in:
@@ -822,7 +822,7 @@ public class Player {
|
||||
.setProfilePicture(ProfilePicture.newBuilder().setAvatarId(this.getHeadImage()));
|
||||
|
||||
if (this.getWorld() != null) {
|
||||
onlineInfo.setCurPlayerNumInWorld(this.getWorld().getPlayers().indexOf(this) + 1);
|
||||
onlineInfo.setCurPlayerNumInWorld(getWorld().getPlayerCount());
|
||||
} else {
|
||||
onlineInfo.setCurPlayerNumInWorld(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user