From 76e11acb0375b2ff840f7cdd254d4d599e019f36 Mon Sep 17 00:00:00 2001 From: CuzImClicks Date: Mon, 22 Feb 2021 14:20:06 +0100 Subject: small fix --- .gitignore | 10 ++++++++++ src/main/java/me/Danker/commands/FairySoulsCommand.java | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f354308..db10469 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,13 @@ build eclipse run *.txt +*.cfg +*.gz +*.log +*.dat +*.mca +*.json +*.dat_mcr +*.lock +*.dat_old +*.properties diff --git a/src/main/java/me/Danker/commands/FairySoulsCommand.java b/src/main/java/me/Danker/commands/FairySoulsCommand.java index 2475435..77a7586 100644 --- a/src/main/java/me/Danker/commands/FairySoulsCommand.java +++ b/src/main/java/me/Danker/commands/FairySoulsCommand.java @@ -51,10 +51,11 @@ public class FairySoulsCommand extends CommandBase { } // Get UUID for Hypixel API requests - String username, uuid; + String username; + String uuid; if(args.length == 0) { username = player.getName(); - uuid = player.getUniqueID().toString().replace("[\\-]", ""); + uuid = APIHandler.getUUID(username); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking fairy souls of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); } else { username = args[0]; @@ -68,6 +69,7 @@ public class FairySoulsCommand extends CommandBase { String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); + JsonObject profileResponse = APIHandler.getResponse(profileURL); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); -- cgit