aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCuzImClicks <bruno778.whiteelfie@gmail.com>2021-02-22 14:20:06 +0100
committerCuzImClicks <bruno778.whiteelfie@gmail.com>2021-02-22 14:20:06 +0100
commit76e11acb0375b2ff840f7cdd254d4d599e019f36 (patch)
tree348f402d9b5f7e3e1308895d55c29c938c0fefc2
parent74e7ad6f48d557f611b7ffe20a53fffd3bb5f604 (diff)
downloadSkyblockMod-76e11acb0375b2ff840f7cdd254d4d599e019f36.tar.gz
SkyblockMod-76e11acb0375b2ff840f7cdd254d4d599e019f36.tar.bz2
SkyblockMod-76e11acb0375b2ff840f7cdd254d4d599e019f36.zip
small fix
-rw-r--r--.gitignore10
-rw-r--r--src/main/java/me/Danker/commands/FairySoulsCommand.java6
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();