aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/handlers
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-09-28 11:50:08 -0400
committerbowser0000 <bowser0000@gmail.com>2020-09-28 11:50:08 -0400
commit3629f2f90c24a76c3568cb63d4d03623ce1d54c7 (patch)
tree4714a88cc81809acfa5210bd09799bbc0f6d3c40 /src/main/java/me/Danker/handlers
parent861a1b604991986963dde848c4a86c586408640b (diff)
downloadSkyblockMod-3629f2f90c24a76c3568cb63d4d03623ce1d54c7.tar.gz
SkyblockMod-3629f2f90c24a76c3568cb63d4d03623ce1d54c7.tar.bz2
SkyblockMod-3629f2f90c24a76c3568cb63d4d03623ce1d54c7.zip
Fix player tab complete and UUID returning error 204
Diffstat (limited to 'src/main/java/me/Danker/handlers')
-rw-r--r--src/main/java/me/Danker/handlers/APIHandler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/handlers/APIHandler.java b/src/main/java/me/Danker/handlers/APIHandler.java
index 34a73ff..b8d52dc 100644
--- a/src/main/java/me/Danker/handlers/APIHandler.java
+++ b/src/main/java/me/Danker/handlers/APIHandler.java
@@ -53,8 +53,11 @@ public class APIHandler {
JsonObject object = gson.fromJson(error, JsonObject.class);
return object;
}
+ } else if (urlString.startsWith("https://api.mojang.com/users/profiles/minecraft/") && conn.getResponseCode() == 204) {
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: Player does not exist."));
+ } else {
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Request failed. HTTP Error Code: " + conn.getResponseCode()));
}
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Request failed. HTTP Error Code: " + conn.getResponseCode()));
}
} catch (MalformedURLException ex) {
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "An error has occured. See logs for more details."));