mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2025-04-18 16:47:06 +00:00
Add User-Agent header to PlayerDB lookup requests
This commit is contained in:
parent
60e9e2acbd
commit
f598f5bf2d
@ -29,7 +29,11 @@ public class NameFetcher {
|
||||
|
||||
public static String getName(UUID uuid) throws IOException {
|
||||
String url = "https://playerdb.co/api/player/minecraft/" + uuid.toString();
|
||||
Request request = new Request.Builder().url(url).get().build();
|
||||
Request request = new Request.Builder()
|
||||
.addHeader("User-Agent", "RedisBungee-ProxioDev")
|
||||
.url(url)
|
||||
.get()
|
||||
.build();
|
||||
ResponseBody body = httpClient.newCall(request).execute().body();
|
||||
String response = body.string();
|
||||
body.close();
|
||||
|
Loading…
Reference in New Issue
Block a user