The method .getPlayer(String name) specifically states it is not able to retrieve offline players, however the .getPlayer(UUID id) does not say that. Does anyone know if getting a player via UUID works for offline players?
I know there is a pull request for GameProfile cache, but I am interested in this particular method at the moment.
right now, i think retrieval with UUID will help you get a Player object, maybe as a User, regardless of whether or not they’re online simply because its a UUID. UUIDs are what we use to record players as opposed to playernames. getPlayer(String name) probably won’t work for offline because having a name cache or retrieving player names just to find an offline player isn’t worth the memory usage and potential thread death from trying to call the nameserver.
tl;dr i’d assume getPlayer(UUID) will help you get an offline player. getPlayer(String) has its reason not to work for the former.
Feedback is needed on @boformer’s PR. This part of the API can be added faster if you provide some comments on it. Even just saying you approve of all the additions (after reviewing them of course) helps.