diff options
Diffstat (limited to 'src/main/java/me/Danker/commands/GuildOfCommand.java')
-rw-r--r-- | src/main/java/me/Danker/commands/GuildOfCommand.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/commands/GuildOfCommand.java b/src/main/java/me/Danker/commands/GuildOfCommand.java index 1c9f1c4..a97196e 100644 --- a/src/main/java/me/Danker/commands/GuildOfCommand.java +++ b/src/main/java/me/Danker/commands/GuildOfCommand.java @@ -56,6 +56,7 @@ public class GuildOfCommand extends CommandBase { String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + return; } // Get UUID for Hypixel API requests @@ -74,7 +75,7 @@ public class GuildOfCommand extends CommandBase { // Find guild ID System.out.println("Fetching guild..."); String guildURL = "https://api.hypixel.net/guild?player=" + uuid + "&key=" + key; - JsonObject guildResponse = APIHandler.getResponse(guildURL); + JsonObject guildResponse = APIHandler.getResponse(guildURL, true); if (!guildResponse.get("success").getAsBoolean()) { String reason = guildResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); |