diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-11-09 14:50:39 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-11-09 14:50:39 -0500 |
commit | 511b95de7dcb83e047dce2adadeff8c18804c1b6 (patch) | |
tree | 9e83ee2e91842b6c19a5bb05c0a9d7acac89e3ae /src/main/java/me/Danker/commands/PetsCommand.java | |
parent | 432ee590f73a08b184f0d0ec65b8549aa2f3e877 (diff) | |
download | SkyblockMod-511b95de7dcb83e047dce2adadeff8c18804c1b6.tar.gz SkyblockMod-511b95de7dcb83e047dce2adadeff8c18804c1b6.tar.bz2 SkyblockMod-511b95de7dcb83e047dce2adadeff8c18804c1b6.zip |
Add config values for colours and many bug fixes
Fix spooky fishing config values
Add spooky fishing to /importfishing
Add boolean to config to truely turn off chat Maddox
Remove bold red name from three man puzzle answer
Change spooky fishing to fishing spooky
Diffstat (limited to 'src/main/java/me/Danker/commands/PetsCommand.java')
-rw-r--r-- | src/main/java/me/Danker/commands/PetsCommand.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/me/Danker/commands/PetsCommand.java b/src/main/java/me/Danker/commands/PetsCommand.java index d6d4122..031d087 100644 --- a/src/main/java/me/Danker/commands/PetsCommand.java +++ b/src/main/java/me/Danker/commands/PetsCommand.java @@ -8,6 +8,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import me.Danker.TheMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -85,7 +86,7 @@ public class PetsCommand extends CommandBase { // Check key String key = cf.getString("api", "APIKey"); if (key.equals("")) { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey.")); + player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey.")); } // Get UUID for Hypixel API requests @@ -94,10 +95,10 @@ public class PetsCommand extends CommandBase { if (arg1.length == 0) { username = player.getName(); uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); - player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking pets of " + EnumChatFormatting.DARK_GREEN + username)); + player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking pets of " + TheMod.SECONDARY_COLOUR + username)); } else { username = arg1[0]; - player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking pets of " + EnumChatFormatting.DARK_GREEN + username)); + player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking pets of " + TheMod.SECONDARY_COLOUR + username)); uuid = ah.getUUID(username); } @@ -110,14 +111,14 @@ public class PetsCommand extends CommandBase { JsonObject profileResponse = ah.getResponse(profileURL); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason)); + player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } System.out.println("Fetching pets..."); JsonArray petsArray = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject().get("pets").getAsJsonArray(); if (petsArray.size() == 0) { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + username + " has no pets.")); + player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + username + " has no pets.")); return; } @@ -160,7 +161,7 @@ public class PetsCommand extends CommandBase { } int totalPets = commonPets.size() + uncommonPets.size() + rarePets.size() + epicPets.size() + legendaryPets.size(); - String finalMessage = EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + + String finalMessage = TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.AQUA + " " + username + "'s Pets (" + totalPets + "):\n"; // Loop through pet rarities @@ -234,7 +235,7 @@ public class PetsCommand extends CommandBase { finalMessage += messageToAdd + "\n"; } - finalMessage += EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------"; + finalMessage += TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"; player.addChatMessage(new ChatComponentText(finalMessage)); }).start(); |