diff options
author | CuzImClicks <bruno778.whiteelfie@gmail.com> | 2021-02-22 14:20:06 +0100 |
---|---|---|
committer | CuzImClicks <bruno778.whiteelfie@gmail.com> | 2021-02-22 14:20:06 +0100 |
commit | 76e11acb0375b2ff840f7cdd254d4d599e019f36 (patch) | |
tree | 348f402d9b5f7e3e1308895d55c29c938c0fefc2 /src/main/java/me | |
parent | 74e7ad6f48d557f611b7ffe20a53fffd3bb5f604 (diff) | |
download | SkyblockMod-76e11acb0375b2ff840f7cdd254d4d599e019f36.tar.gz SkyblockMod-76e11acb0375b2ff840f7cdd254d4d599e019f36.tar.bz2 SkyblockMod-76e11acb0375b2ff840f7cdd254d4d599e019f36.zip |
small fix
Diffstat (limited to 'src/main/java/me')
-rw-r--r-- | src/main/java/me/Danker/commands/FairySoulsCommand.java | 6 |
1 files changed, 4 insertions, 2 deletions
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(); |