Closed Techdaan closed 1 year ago
before merging, does this api provider need any kind of tos agreement?
anyways we might need to set user agent based on info provided in the site.
Other Information
The API has no rate limits in place, but we ask that you please include an identifying user-agent header in any requests that you make to the API, so we can contact you if necessary about your usage.
Yeah, I don't think there's any TOS agreements but I did forget to set an user agent.
Do you have any suggestions for the User-Agent
header? Since this is a form, RedisBungee
might be too vague, perhaps something like RedisBungee-ProxioDev
?
One you suggested seems to be great
I just made the change, I haven't tested it yet though because I am currently busy with some other things. If you want to, I can make sure there's no errors when lookups are made later.
Done some testing it seems like its working and fetches the name perfectly.
fixes: #59
before merging this you can include this code in name fetcher class to maintain compatibility .
public static List<String> nameHistoryFromUuid(UUID uuid) throws IOException {
String name = getName(uuid);
if (name == null) return Collections.emptyList();
return Collections.singletonList(name);
}
for some reason ssh connections being dropped
Heyhey, I missed your message earlier. I just added that snippet :)
I noticed that currently name lookups for UUIDs that are not cached, are not supported in RedisBungee due to Mojang removing name history.
When looking at the usages, RedisBungee internally only uses the current name (So no need for full name historyy), so I moved name lookups to PlayerDB, which does not have API rate limits unlike Mojang's API.
Due to removing the
NameFetcher#nameHistoryFromUuid
, this might break backwards compatibility, but it should be easy to re-add the method and throw an exception like it does now.closes #59