diff options
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/FairySoulsCommand.java | 6 |
2 files changed, 14 insertions, 2 deletions
@@ -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(); |