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

Added getOnlinePlayersFromNation function for API use #9

Closed
wants to merge 1 commit into from

Conversation

cortageus
Copy link

Description:

I added a getOnlinePlayersFromNation function to help improve efficiency of checking online players from a nation. Right now you have to manually comb through every single player in a nation and check if "isOnline" is true. I am in a nation with around 500 players and with sending 1 request per second it takes around 8.5 minutes to get a list of only around 12 players. The API also cannot handle shorter intervals as it returns an HTTP 429, "Too many requests." If this gets approved I plan on sending another pull request in the API repo.


New Nodes/Commands/ConfigOptions:


Relevant Towny Issue ticket:


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

@Warriorrrr
Copy link

This repository unfortunately does not accept PRs, as this is just our fork of towny with some minor changes on the fork branch. The TownyAPI class also already has the getOnlinePlayersInNation method, which means this extra method isn't needed.

@Warriorrrr Warriorrrr closed this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants