feat: 优化结构

This commit is contained in:
2023-11-12 17:22:53 +08:00
parent ea38a715c7
commit b52685e94c
4 changed files with 30 additions and 30 deletions

View File

@@ -56,7 +56,7 @@ public class HamsterBallPlugin extends Plugin {
new ServerOnlineEvent(BallAPI.getInstance().getLocalServerInfo())
);
// 移除失效的在线玩家
BallAPI.getInstance().getPlayerInfo().values()
BallAPI.getInstance().getAllPlayerInfo().values()
.stream()
.filter(BallPlayerInfo::isOnline)
.filter(o -> BallAPI.getInstance().isLocalServer(o.getProxyServer()))