aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/BankCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker/commands/BankCommand.java')
-rw-r--r--src/main/java/me/Danker/commands/BankCommand.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/commands/BankCommand.java b/src/main/java/me/Danker/commands/BankCommand.java
index ddf9502..e4a8eee 100644
--- a/src/main/java/me/Danker/commands/BankCommand.java
+++ b/src/main/java/me/Danker/commands/BankCommand.java
@@ -62,6 +62,7 @@ public class BankCommand 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
@@ -83,7 +84,7 @@ public class BankCommand 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(EnumChatFormatting.RED + "Failed with reason: " + reason));