Conversation
There was a problem hiding this comment.
💡 Codex Review
CyberLevels/src/main/java/com/bitaspire/cyberlevels/UserManagerImpl.java
Lines 104 to 108 in cd89471
getUser(UUID) still calls loadUser(player) even though the refactor removed that method in favor of the new async loaders. With no matching method in this class, this call does not compile, so the project fails to build until the call is updated (e.g., use loadUserAsync/loadPlayer or restore the old helper).
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| " &7offline player(s) in &a" + | ||
| (System.currentTimeMillis() - l) + | ||
| "ms&7.", ""); | ||
|
|
||
| scheduleLeaderboardUpdate(); |
There was a problem hiding this comment.
Wait for offline async loads before refreshing leaderboard
loadOfflinePlayers now enqueues loadUserAsync calls but immediately logs completion and calls scheduleLeaderboardUpdate() once the queue is filled. Because user data is added to users later in finishUserLoad, the leaderboard update can run before the async loads finish, producing a stale leaderboard and misleading “loaded X players” timing when many offline users exist. The refresh should be triggered after the async callbacks complete.
Useful? React with 👍 / 👎.
| " &7online player(s) in &a" + | ||
| (System.currentTimeMillis() - l) + | ||
| "ms&7.", ""); | ||
| scheduleLeaderboardUpdate(); |
There was a problem hiding this comment.
Defer online leaderboard refresh until async loads finish
loadOnlinePlayers also enqueues asynchronous loadUserAsync calls but logs success and triggers scheduleLeaderboardUpdate() immediately afterward. finishUserLoad populates the users map on a later tick, so this update can run before the newly enqueued players are available, leaving the leaderboard temporarily missing online players. The refresh should be delayed until the async loads complete.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task