-
Notifications
You must be signed in to change notification settings - Fork 54
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
Use PlayerDB.co for name lookups #82
Conversation
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.
|
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 |
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