diff options
Diffstat (limited to 'src/main/java/me/Danker/commands/ArmourCommand.java')
-rw-r--r-- | src/main/java/me/Danker/commands/ArmourCommand.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/commands/ArmourCommand.java b/src/main/java/me/Danker/commands/ArmourCommand.java index 4597309..e9a20ee 100644 --- a/src/main/java/me/Danker/commands/ArmourCommand.java +++ b/src/main/java/me/Danker/commands/ArmourCommand.java @@ -67,6 +67,7 @@ public class ArmourCommand extends CommandBase { String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey.")); + return; } // Get UUID for Hypixel API requests @@ -88,7 +89,7 @@ public class ArmourCommand extends CommandBase { String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); - JsonObject profileResponse = APIHandler.getResponse(profileURL); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); |