Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accurate player list #106

Merged

Conversation

Haolaaa
Copy link

@Haolaaa Haolaaa commented Oct 29, 2024

No description provided.

@ReCore-sys ReCore-sys linked an issue Oct 30, 2024 that may be closed by this pull request
@Sweattypalms
Copy link
Member

Please use into_entities on the query. And to get the count, use the Vec's length. And for displaying, use the first 5 entries or only show top few players. Since with more players it'd definitely become a mess. You can loop over the Vec<usize> where usize is the Entity Id. Just do state.universe.get::<PlayerIdentity>(entity) and collect it.

@Haolaaa
Copy link
Author

Haolaaa commented Oct 31, 2024

Done! Thanks for the feedback, let me know if there’s anything else to adjust!

@Sweattypalms
Copy link
Member

Please merge the main branch with your branch so these clippy warnings go away! Sorry!

@Sweattypalms Sweattypalms merged commit 0324f85 into ferrumc-rs:rewrite/v3 Nov 1, 2024
3 checks passed
@Haolaaa Haolaaa deleted the fix/dynamic-player-count branch November 1, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accurate player list
3 participants