diff options
Diffstat (limited to 'src/main/java/me/Danker/commands')
23 files changed, 468 insertions, 405 deletions
diff --git a/src/main/java/me/Danker/commands/ArmourCommand.java b/src/main/java/me/Danker/commands/ArmourCommand.java index a10d75f..579a413 100644 --- a/src/main/java/me/Danker/commands/ArmourCommand.java +++ b/src/main/java/me/Danker/commands/ArmourCommand.java @@ -1,15 +1,7 @@ package me.Danker.commands; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Base64; -import java.util.Collections; -import java.util.List; - import com.google.gson.JsonObject; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -24,6 +16,13 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Base64; +import java.util.Collections; +import java.util.List; + public class ArmourCommand extends CommandBase { @Override @@ -72,10 +71,10 @@ public class ArmourCommand extends CommandBase { if (arg1.length == 0) { username = player.getName(); uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking armour of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking armour of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); } else { username = arg1[0]; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking armour of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking armour of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); uuid = APIHandler.getUUID(username); } @@ -88,7 +87,7 @@ public class ArmourCommand extends CommandBase { JsonObject profileResponse = APIHandler.getResponse(profileURL); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } @@ -131,16 +130,16 @@ public class ArmourCommand extends CommandBase { } armourStream.close(); - player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.AQUA + " " + username + "'s Armour:\n" + - TheMod.TYPE_COLOUR + " Helmet: " + helmet + "\n" + - TheMod.TYPE_COLOUR + " Chestplate: " + chest + "\n" + - TheMod.TYPE_COLOUR + " Leggings: " + legs + "\n" + - TheMod.TYPE_COLOUR + " Boots: " + boots + "\n" + - TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); + DankersSkyblockMod.TYPE_COLOUR + " Helmet: " + helmet + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Chestplate: " + chest + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Leggings: " + legs + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Boots: " + boots + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); } catch (IOException ex) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "An error has occurred while reading inventory data. See logs for more info.")); - System.err.println(ex); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "An error has occurred while reading inventory data. See logs for more info.")); + ex.printStackTrace(); } }).start(); } diff --git a/src/main/java/me/Danker/commands/BankCommand.java b/src/main/java/me/Danker/commands/BankCommand.java index 6e2ddaa..e1bbdde 100644 --- a/src/main/java/me/Danker/commands/BankCommand.java +++ b/src/main/java/me/Danker/commands/BankCommand.java @@ -1,13 +1,7 @@ package me.Danker.commands; -import java.text.NumberFormat; -import java.util.Collections; -import java.util.List; -import java.util.Locale; - import com.google.gson.JsonObject; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -19,6 +13,11 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.text.NumberFormat; +import java.util.Collections; +import java.util.List; +import java.util.Locale; + public class BankCommand extends CommandBase { @Override @@ -67,10 +66,10 @@ public class BankCommand extends CommandBase { if (arg1.length == 0) { username = player.getName(); uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking coins of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking coins of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); } else { username = arg1[0]; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking coins of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking coins of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); uuid = APIHandler.getUUID(username); } @@ -89,25 +88,26 @@ public class BankCommand extends CommandBase { System.out.println("Fetching bank + purse coins..."); double purseCoins = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject().get("coin_purse").getAsDouble(); - purseCoins = (double) Math.floor(purseCoins * 100.0) / 100.0; + purseCoins = Math.floor(purseCoins * 100.0) / 100.0; NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); // Check for bank api if (profileResponse.get("profile").getAsJsonObject().has("banking")) { double bankCoins = profileResponse.get("profile").getAsJsonObject().get("banking").getAsJsonObject().get("balance").getAsDouble(); - bankCoins = (double) Math.floor(bankCoins * 100.0) / 100.0; + bankCoins = Math.floor(bankCoins * 100.0) / 100.0; - player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.AQUA + " " + username + "'s Coins:\n" + - TheMod.TYPE_COLOUR + " Bank: " + EnumChatFormatting.GOLD + nf.format(bankCoins) + "\n" + - TheMod.TYPE_COLOUR + " Purse: " + EnumChatFormatting.GOLD + nf.format(purseCoins) + "\n" + - TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); + DankersSkyblockMod.TYPE_COLOUR + " Bank: " + EnumChatFormatting.GOLD + nf.format(bankCoins) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Purse: " + EnumChatFormatting.GOLD + nf.format(purseCoins) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Total: " + EnumChatFormatting.GOLD + nf.format(bankCoins + purseCoins) + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); } else { - player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.AQUA + " " + username + "'s Coins:\n" + - TheMod.TYPE_COLOUR + " Bank: " + EnumChatFormatting.RED + "Bank API disabled.\n" + - TheMod.TYPE_COLOUR + " Purse: " + EnumChatFormatting.GOLD + nf.format(purseCoins) + "\n" + - TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); + DankersSkyblockMod.TYPE_COLOUR + " Bank: " + EnumChatFormatting.RED + "Bank API disabled.\n" + + DankersSkyblockMod.TYPE_COLOUR + " Purse: " + EnumChatFormatting.GOLD + nf.format(purseCoins) + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); } }).start(); } diff --git a/src/main/java/me/Danker/commands/BlockSlayerCommand.java b/src/main/java/me/Danker/commands/BlockSlayerCommand.java index d2144f6..606b930 100644 --- a/src/main/java/me/Danker/commands/BlockSlayerCommand.java +++ b/src/main/java/me/Danker/commands/BlockSlayerCommand.java @@ -1,8 +1,6 @@ package me.Danker.commands; -import java.util.List; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -11,6 +9,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; +import java.util.List; + public class BlockSlayerCommand extends CommandBase { public static String onlySlayerName = ""; @@ -46,7 +46,7 @@ public class BlockSlayerCommand extends CommandBase { final EntityPlayer player = (EntityPlayer)arg0; if (arg1.length == 0 || (arg1.length == 1 && !arg1[0].equalsIgnoreCase("off"))) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } @@ -64,10 +64,10 @@ public class BlockSlayerCommand extends CommandBase { onlySlayerName = ""; onlySlayerNumber = ""; ConfigHandler.writeStringConfig("toggles", "BlockSlayer", ""); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Slayer blocking turned off.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Slayer blocking turned off.")); return; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } @@ -89,12 +89,12 @@ public class BlockSlayerCommand extends CommandBase { default: onlySlayerName = ""; onlySlayerNumber = ""; - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } ConfigHandler.writeStringConfig("toggles", "BlockSlayer", onlySlayerName + " " + onlySlayerNumber); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Slayer blocking set to " + TheMod.SECONDARY_COLOUR + onlySlayerName + " " + onlySlayerNumber)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Slayer blocking set to " + DankersSkyblockMod.SECONDARY_COLOUR + onlySlayerName + " " + onlySlayerNumber)); } } diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 4f99c0d..ee5958c 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -1,6 +1,6 @@ package me.Danker.commands; -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; @@ -29,19 +29,19 @@ public class DHelpCommand extends CommandBase { public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { EntityPlayer player = (EntityPlayer) arg0; - player.addChatMessage(new ChatComponentText("\n" + EnumChatFormatting.GOLD + " " + TheMod.MODID + " Version " + TheMod.VERSION + "\n" + + player.addChatMessage(new ChatComponentText("\n" + EnumChatFormatting.GOLD + " " + DankersSkyblockMod.MODID + " Version " + DankersSkyblockMod.VERSION + "\n" + EnumChatFormatting.AQUA + " <> = Mandatory parameter. [] = Optional parameter.\n" + EnumChatFormatting.GOLD + " Commands, " + EnumChatFormatting.GREEN + " Keybinds.\n" + EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" + EnumChatFormatting.GOLD + " /dsm" + EnumChatFormatting.AQUA + " - Opens the GUI for Danker's Skyblock Mod.\n" + - EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/threemanpuzzle/midasstaffmessages/healmessages/caketimer/lowhealthnotify/lividsolver/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/startswithterminal/selectallterminal/itemframeonsealanterns/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/midasstaffmessages/implosionmessages/healmessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/caketimer/lowhealthnotify/lividsolver/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey <key>" + EnumChatFormatting.AQUA + " - Sets API key.\n" + EnumChatFormatting.GOLD + " /getkey" + EnumChatFormatting.AQUA + " - Returns key set with /setkey and copies it to your clipboard.\n" + EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs/mythological/> [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + EnumChatFormatting.GOLD + " /display <zombie/spider/wolf/fishing/catacombs/mythological/auto/off> [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays winter sea creatures instead. /display auto automatically displays the loot for the slayer quest you have active.\n" + EnumChatFormatting.GOLD + " /resetloot <zombie/spider/wolf/fishing/catacombs/mythological/confirm/cancel>" + EnumChatFormatting.AQUA + " - Resets loot for trackers. /resetloot confirm confirms the reset.\n" + - EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" + - EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" + + EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" + + EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" + EnumChatFormatting.GOLD + " /slayer [player]" + EnumChatFormatting.AQUA + " - Uses API to get slayer xp of a person. If no name is provided, it checks yours.\n" + EnumChatFormatting.GOLD + " /skills [player]" + EnumChatFormatting.AQUA + " - Uses API to get skill levels of a person. If no name is provided, it checks yours.\n" + EnumChatFormatting.GOLD + " /lobbyskills" + EnumChatFormatting.AQUA + " - Uses API to find the average skills of the lobby, as well the three players with the highest skill average.\n" + diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 3616849..18230e6 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -1,6 +1,6 @@ package me.Danker.commands; -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; @@ -24,7 +24,7 @@ public class DankerGuiCommand extends CommandBase { @Override public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { - TheMod.guiToOpen = "dankergui1"; + DankersSkyblockMod.guiToOpen = "dankergui1"; } } diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java index 1cd8c80..d20491b 100644 --- a/src/main/java/me/Danker/commands/DisplayCommand.java +++ b/src/main/java/me/Danker/commands/DisplayCommand.java @@ -1,8 +1,6 @@ package me.Danker.commands; -import java.util.List; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -11,6 +9,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; +import java.util.List; + public class DisplayCommand extends CommandBase { public static String display; public static boolean auto; @@ -38,7 +38,7 @@ public class DisplayCommand extends CommandBase { return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6", "f7", "floor7"); - } else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) { + } else if (args.length > 1) { return getListOfStringsMatchingLastWord(args, "session"); } return null; @@ -49,7 +49,7 @@ public class DisplayCommand extends CommandBase { final EntityPlayer player = (EntityPlayer) arg0; if (arg1.length == 0) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } @@ -71,6 +71,7 @@ public class DisplayCommand extends CommandBase { } else { display = "spider"; } + break; case "zombie": if (showSession) { display = "zombie_session"; @@ -126,7 +127,7 @@ public class DisplayCommand extends CommandBase { break; case "catacombs": if (arg1.length == 1) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /display catacombs <f1/f2/f3/f4f5/f6/f7>")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: /display catacombs <f1/f2/f3/f4f5/f6/f7>")); return; } @@ -188,25 +189,25 @@ public class DisplayCommand extends CommandBase { } break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /display catacombs <f1/f2/f3/f4/f5/f6/f7>")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: /display catacombs <f1/f2/f3/f4/f5/f6/f7>")); return; } break; case "auto": auto = true; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Display set to " + TheMod.SECONDARY_COLOUR + "auto" + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display set to " + DankersSkyblockMod.SECONDARY_COLOUR + "auto" + DankersSkyblockMod.MAIN_COLOUR + ".")); ConfigHandler.writeBooleanConfig("misc", "autoDisplay", true); return; case "off": display = "off"; break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } auto = false; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Display set to " + TheMod.SECONDARY_COLOUR + display + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display set to " + DankersSkyblockMod.SECONDARY_COLOUR + display + DankersSkyblockMod.MAIN_COLOUR + ".")); ConfigHandler.writeBooleanConfig("misc", "autoDisplay", false); ConfigHandler.writeStringConfig("misc", "display", display); } diff --git a/src/main/java/me/Danker/commands/DungeonsCommand.java b/src/main/java/me/Danker/commands/DungeonsCommand.java index 4b8c126..bdc1403 100644 --- a/src/main/java/me/Danker/commands/DungeonsCommand.java +++ b/src/main/java/me/Danker/commands/DungeonsCommand.java @@ -1,10 +1,7 @@ package me.Danker.commands; -import java.util.List; - import com.google.gson.JsonObject; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -16,6 +13,8 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.util.List; + public class DungeonsCommand extends CommandBase { @Override @@ -50,7 +49,7 @@ public class DungeonsCommand extends CommandBase { // Check key String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); } // Get UUID for Hypixel API requests @@ -59,10 +58,10 @@ public class DungeonsCommand extends CommandBase { if (arg1.length == 0) { username = player.getName(); uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking dungeon stats of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking dungeon stats of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); } else { username = arg1[0]; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking dungeon stats of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking dungeon stats of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); uuid = APIHandler.getUUID(username); } @@ -75,14 +74,14 @@ public class DungeonsCommand extends CommandBase { JsonObject profileResponse = APIHandler.getResponse(profileURL); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } System.out.println("Fetching dungeon stats..."); JsonObject dungeonsObject = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject().get("dungeons").getAsJsonObject(); if (!dungeonsObject.get("dungeon_types").getAsJsonObject().get("catacombs").getAsJsonObject().has("experience")) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "This player has not played dungeons.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "This player has not played dungeons.")); return; } @@ -94,7 +93,7 @@ public class DungeonsCommand extends CommandBase { double tank = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("tank").getAsJsonObject().get("experience").getAsDouble()); String selectedClass = Utils.capitalizeString(dungeonsObject.get("selected_dungeon_class").getAsString()); - player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + " Catacombs Level: " + catacombs + "\n" + EnumChatFormatting.GOLD + " Selected Class: " + selectedClass + "\n\n" + EnumChatFormatting.YELLOW + " Healer Level: " + healer + "\n" + @@ -102,7 +101,7 @@ public class DungeonsCommand extends CommandBase { EnumChatFormatting.RED + " Berserk Level: " + berserk + "\n" + EnumChatFormatting.GREEN + " Archer Level: " + archer + "\n" + EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n" + - TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); }).start(); } diff --git a/src/main/java/me/Danker/commands/GetkeyCommand.java b/src/main/java/me/Danker/commands/GetkeyCommand.java index e7dd051..9cbb280 100644 --- a/src/main/java/me/Danker/commands/GetkeyCommand.java +++ b/src/main/java/me/Danker/commands/GetkeyCommand.java @@ -1,10 +1,6 @@ package me.Danker.commands; -import java.awt.Toolkit; -import java.awt.datatransfer.Clipboard; -import java.awt.datatransfer.StringSelection; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -13,6 +9,10 @@ import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; +import java.awt.*; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.StringSelection; + public class GetkeyCommand extends CommandBase implements ICommand { @Override @@ -37,12 +37,12 @@ public class GetkeyCommand extends CommandBase implements ICommand { StringSelection stringSelection = new StringSelection(ConfigHandler.getString("api", "APIKey")); if (ConfigHandler.getString("api", "APIKey").equals("")) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Set your API key using /setkey.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Set your API key using /setkey.")); } clipboard.setContents(stringSelection, null); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Your set API key is " + TheMod.SECONDARY_COLOUR + ConfigHandler.getString("api", "APIKey") + "\n" + - TheMod.MAIN_COLOUR + " Your set API key has been copied to the clipboard.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Your set API key is " + DankersSkyblockMod.SECONDARY_COLOUR + ConfigHandler.getString("api", "APIKey") + "\n" + + DankersSkyblockMod.MAIN_COLOUR + " Your set API key has been copied to the clipboard.")); } diff --git a/src/main/java/me/Danker/commands/GuildOfCommand.java b/src/main/java/me/Danker/commands/GuildOfCommand.java index 881a9c4..eb2a26f 100644 --- a/src/main/java/me/Danker/commands/GuildOfCommand.java +++ b/src/main/java/me/Danker/commands/GuildOfCommand.java @@ -1,12 +1,9 @@ package me.Danker.commands; -import java.util.List; - import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -18,6 +15,8 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.util.List; + public class GuildOfCommand extends CommandBase { @Override @@ -52,7 +51,7 @@ public class GuildOfCommand extends CommandBase { // Check key String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); } // Get UUID for Hypixel API requests @@ -61,10 +60,10 @@ public class GuildOfCommand extends CommandBase { if (arg1.length == 0) { username = player.getName(); uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking guild of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking guild of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); } else { username = arg1[0]; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking guild of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking guild of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); uuid = APIHandler.getUUID(username); } @@ -74,7 +73,7 @@ public class GuildOfCommand extends CommandBase { JsonObject guildResponse = APIHandler.getResponse(guildURL); if (!guildResponse.get("success").getAsBoolean()) { String reason = guildResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } @@ -106,12 +105,12 @@ public class GuildOfCommand extends CommandBase { } } - player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.AQUA + " " + username + "'s Guild:\n" + - TheMod.TYPE_COLOUR + " Guild: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + guildName + "\n" + - TheMod.TYPE_COLOUR + " Guildmaster: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + guildMaster + "\n" + - TheMod.TYPE_COLOUR + " Members: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + players + "\n" + - TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); + DankersSkyblockMod.TYPE_COLOUR + " Guild: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + guildName + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Guildmaster: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + guildMaster + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Members: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + players + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); }).start(); } diff --git a/src/main/java/me/Danker/commands/ImportFishingCommand.java b/src/main/java/me/Danker/commands/ImportFishingCommand.java index 734a561..e508ecb 100644 --- a/src/main/java/me/Danker/commands/ImportFishingCommand.java +++ b/src/main/java/me/Danker/commands/ImportFishingCommand.java @@ -1,8 +1,7 @@ package me.Danker.commands; import com.google.gson.JsonObject; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; @@ -37,13 +36,12 @@ public class ImportFishingCommand extends CommandBase { // Check key String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); } - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Importing your fishing stats...")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Importing your fishing stats...")); // Get UUID for Hypixel API requests - String username = player.getName(); String uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); String latestProfile = APIHandler.getLatestProfileID(uuid, key); @@ -54,7 +52,7 @@ public class ImportFishingCommand extends CommandBase { JsonObject profileResponse = APIHandler.getResponse(profileURL); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } @@ -286,7 +284,7 @@ public class ImportFishingCommand extends CommandBase { ConfigHandler.writeIntConfig("fishing", "phantomFisher", LootCommand.phantomFishers); ConfigHandler.writeIntConfig("fishing", "grimReaper", LootCommand.grimReapers); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Fishing stats imported.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Fishing stats imported.")); }).start(); } diff --git a/src/main/java/me/Danker/commands/LobbySkillsCommand.java b/src/main/java/me/Danker/commands/LobbySkillsCommand.java index 679898d..e5bf98c 100644 --- a/src/main/java/me/Danker/commands/LobbySkillsCommand.java +++ b/src/main/java/me/Danker/commands/LobbySkillsCommand.java @@ -1,17 +1,8 @@ package me.Danker.commands; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.stream.Collectors; - import com.google.gson.JsonArray; import com.google.gson.JsonObject; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -24,6 +15,10 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.util.*; +import java.util.Map.Entry; +import java.util.stream.Collectors; + public class LobbySkillsCommand extends CommandBase { Thread mainThread = null; @@ -46,20 +41,20 @@ public class LobbySkillsCommand extends CommandBase { @Override public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { EntityPlayer playerSP = (EntityPlayer) arg0; - Map<String, Double> unsortedSAList = new HashMap<String, Double>(); - ArrayList<Double> lobbySkills = new ArrayList<Double>(); + Map<String, Double> unsortedSAList = new HashMap<>(); + ArrayList<Double> lobbySkills = new ArrayList<>(); // Check key String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { - playerSP.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); return; } mainThread = new Thread(() -> { try { // Create deep copy of players to prevent passing reference and ConcurrentModificationException - Collection<NetworkPlayerInfo> players = new ArrayList<NetworkPlayerInfo>(Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap()); - playerSP.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking skill average of lobby. Estimated time: " + (int) (players.size() * 1.2 + 1) + " seconds.")); + Collection<NetworkPlayerInfo> players = new ArrayList<>(Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap()); + playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking skill average of lobby. Estimated time: " + (int) (players.size() * 1.2 + 1) + " seconds.")); // Send request every .6 seconds, leaving room for another 20 requests per minute for (final NetworkPlayerInfo player : players) { @@ -121,7 +116,7 @@ public class LobbySkillsCommand extends CommandBase { fishingLevel = (double) Math.round(fishingLevel * 100) / 100; } if (latestProfile.has("experience_skill_enchanting")) { - enchantingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_enchanting").getAsDouble(), 50); + enchantingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_enchanting").getAsDouble(), 60); enchantingLevel = (double) Math.round(enchantingLevel * 100) / 100; } if (latestProfile.has("experience_skill_alchemy")) { @@ -148,25 +143,25 @@ public class LobbySkillsCommand extends CommandBase { farmingLevel = achievementObject.get("skyblock_harvester").getAsInt(); } if (achievementObject.has("skyblock_excavator")) { - miningLevel = achievementObject.get("skyblock_excavator").getAsInt(); + miningLevel = Math.min(achievementObject.get("skyblock_excavator").getAsInt(), 50); } if (achievementObject.has("skyblock_combat")) { - combatLevel = achievementObject.get("skyblock_combat").getAsInt(); + combatLevel = Math.min(achievementObject.get("skyblock_combat").getAsInt(), 50); } if (achievementObject.has("skyblock_gatherer")) { - foragingLevel = achievementObject.get("skyblock_gatherer").getAsInt(); + foragingLevel = Math.min(achievementObject.get("skyblock_gatherer").getAsInt(), 50); } if (achievementObject.has("skyblock_angler")) { - fishingLevel = achievementObject.get("skyblock_angler").getAsInt(); + fishingLevel = Math.min(achievementObject.get("skyblock_angler").getAsInt(), 50); } if (achievementObject.has("skyblock_augmentation")) { enchantingLevel = achievementObject.get("skyblock_augmentation").getAsInt(); } if (achievementObject.has("skyblock_concoctor")) { - alchemyLevel = achievementObject.get("skyblock_concoctor").getAsInt(); + alchemyLevel = Math.min(achievementObject.get("skyblock_concoctor").getAsInt(), 50); } if (achievementObject.has("skyblock_domesticator")) { - tamingLevel = achievementObject.get("skyblock_domesticator").getAsInt(); + tamingLevel = Math.min(achievementObject.get("skyblock_domesticator").getAsInt(), 50); } } @@ -182,24 +177,24 @@ public class LobbySkillsCommand extends CommandBase { .collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new)); - String[] sortedSAListKeys = sortedSAList.keySet().toArray(new String[sortedSAList.keySet().size()]); + String[] sortedSAListKeys = sortedSAList.keySet().toArray(new String[0]); String top3 = ""; for (int i = 0; i < 3 && i < sortedSAListKeys.length; i++) { - top3 += "\n " + EnumChatFormatting.AQUA + sortedSAListKeys[i] + ": " + TheMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + sortedSAList.get(sortedSAListKeys[i]); + top3 += "\n " + EnumChatFormatting.AQUA + sortedSAListKeys[i] + ": " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + sortedSAList.get(sortedSAListKeys[i]); } // Get lobby sa double lobbySA = 0; - for (int i = 0; i < lobbySkills.size(); i++) { - lobbySA += lobbySkills.get(i); + for (Double playerSkills : lobbySkills) { + lobbySA += playerSkills; } lobbySA = (double) Math.round((lobbySA / lobbySkills.size()) * 100) / 100; // Finally say skill lobby avg and highest SA users - playerSP.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + - TheMod.TYPE_COLOUR + " Lobby Skill Average: " + TheMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + lobbySA + "\n" + - TheMod.TYPE_COLOUR + " Highest Skill Averages:" + top3 + "\n" + - TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + " -------------------")); + playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + DankersSkyblockMod.TYPE_COLOUR + " Lobby Skill Average: " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + lobbySA + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Highest Skill Averages:" + top3 + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + " -------------------")); } catch (InterruptedException ex) { System.out.println("Current skill average list: " + unsortedSAList.toString()); Thread.currentThread().interrupt(); diff --git a/src/main/java/me/Danker/commands/LootCommand.java b/src/main/java/me/Danker/commands/LootCommand.java index ffe5e49..0f38ada 100644 --- a/src/main/java/me/Danker/commands/LootCommand.java +++ b/src/main/java/me/Danker/commands/LootCommand.java @@ -1,10 +1,6 @@ package me.Danker.commands; -import java.text.NumberFormat; -import java.util.List; -import java.util.Locale; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.utils.Utils; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -14,6 +10,10 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.text.NumberFormat; +import java.util.List; +import java.util.Locale; + public class LootCommand extends CommandBase { // Wolf public static int wolfSvens; @@ -357,7 +357,7 @@ public class LootCommand extends CommandBase { return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6", "f7", "floor7"); - } else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) { + } else if (args.length > 1) { return getListOfStringsMatchingLastWord(args, "session"); } return null; @@ -368,7 +368,7 @@ public class LootCommand extends CommandBase { final EntityPlayer player = (EntityPlayer) arg0; if (arg1.length == 0) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } @@ -778,7 +778,7 @@ public class LootCommand extends CommandBase { break; case "catacombs": if (arg1.length == 1) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /loot catacombs <f1/f2/f3/f4/f5/f6/f7>")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: /loot catacombs <f1/f2/f3/f4/f5/f6/f7>")); return; } switch (arg1[1].toLowerCase()) { @@ -1005,11 +1005,11 @@ public class LootCommand extends CommandBase { EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /loot catacombs <f1/f2/f3/f4/f5/f6/f7>")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: /loot catacombs <f1/f2/f3/f4/f5/f6/f7>")); } break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); } } diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java index 76babad..e9bfe61 100644 --- a/src/main/java/me/Danker/commands/MoveCommand.java +++ b/src/main/java/me/Danker/commands/MoveCommand.java @@ -1,8 +1,6 @@ package me.Danker.commands; -import java.util.List; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -11,6 +9,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; +import java.util.List; + public class MoveCommand extends CommandBase { public static int[] coordsXY = {0, 0}; @@ -20,6 +20,7 @@ public class MoveCommand extends CommandBase { public static int[] lividHpXY = {0, 0}; public static int[] cakeTimerXY = {0, 0}; public static int[] skillTrackerXY = {0, 0}; + public static int[] waterAnswerXY = {0, 0}; @Override public String getCommandName() { @@ -28,7 +29,7 @@ public class MoveCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker> <x> <y>"; + return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer> <x> <y>"; } @Override @@ -39,7 +40,7 @@ public class MoveCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer"); } return null; } @@ -49,7 +50,7 @@ public class MoveCommand extends CommandBase { final EntityPlayer player = (EntityPlayer)arg0; if (arg1.length < 2) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } @@ -59,52 +60,59 @@ public class MoveCommand extends CommandBase { coordsXY[1] = Integer.parseInt(arg1[2]); ConfigHandler.writeIntConfig("locations", "coordsX", coordsXY[0]); ConfigHandler.writeIntConfig("locations", "coordsY", coordsXY[1]); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Coords have been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Coords have been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); break; case "display": displayXY[0] = Integer.parseInt(arg1[1]); displayXY[1] = Integer.parseInt(arg1[2]); ConfigHandler.writeIntConfig("locations", "displayX", displayXY[0]); ConfigHandler.writeIntConfig("locations", "displayY", displayXY[1]); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Tracker display has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Tracker display has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); break; case "dungeontimer": dungeonTimerXY[0] = Integer.parseInt(arg1[1]); dungeonTimerXY[1] = Integer.parseInt(arg1[2]); ConfigHandler.writeIntConfig("locations", "dungeonTimerX", dungeonTimerXY[0]); ConfigHandler.writeIntConfig("locations", "dungeonTimerY", dungeonTimerXY[1]); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Dungeon timer has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Dungeon timer has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); break; case "skill50": skill50XY[0] = Integer.parseInt(arg1[1]); skill50XY[1] = Integer.parseInt(arg1[2]); ConfigHandler.writeIntConfig("locations", "skill50X", skill50XY[0]); ConfigHandler.writeIntConfig("locations", "skill50Y", skill50XY[1]); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill 50 display has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill 50 display has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); break; case "lividhp": lividHpXY[0] = Integer.parseInt(arg1[1]); lividHpXY[1] = Integer.parseInt(arg1[2]); ConfigHandler.writeIntConfig("locations", "lividHpX", lividHpXY[0]); ConfigHandler.writeIntConfig("locations", "lividHpY", lividHpXY[1]); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Livid HP has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Livid HP has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); break; case "caketimer": cakeTimerXY[0] = Integer.parseInt(arg1[1]); cakeTimerXY[1] = Integer.parseInt(arg1[2]); ConfigHandler.writeIntConfig("locations", "cakeTimerX", cakeTimerXY[0]); ConfigHandler.writeIntConfig("locations", "cakeTimerY", cakeTimerXY[1]); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Cake timer has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Cake timer has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); break; case "skilltracker": skillTrackerXY[0] = Integer.parseInt(arg1[1]); skillTrackerXY[1] = Integer.parseInt(arg1[2]); ConfigHandler.writeIntConfig("locations", "skillTrackerX", skillTrackerXY[0]); ConfigHandler.writeIntConfig("locations", "skillTrackerY", skillTrackerXY[1]); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + break; + case "wateranswer": + waterAnswerXY[0] = Integer.parseInt(arg1[1]); + waterAnswerXY[1] = Integer.parseInt(arg1[2]); + ConfigHandler.writeIntConfig("locations", "waterAnswerX", waterAnswerXY[0]); + ConfigHandler.writeIntConfig("locations", "waterAnswerY", waterAnswerXY[1]); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Water solver answer has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); } } diff --git a/src/main/java/me/Danker/commands/PetsCommand.java b/src/main/java/me/Danker/commands/PetsCommand.java index 8e41814..7b1b52f 100644 --- a/src/main/java/me/Danker/commands/PetsCommand.java +++ b/src/main/java/me/Danker/commands/PetsCommand.java @@ -1,14 +1,9 @@ package me.Danker.commands; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -20,6 +15,9 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.util.ArrayList; +import java.util.List; + public class PetsCommand extends CommandBase { static int petXpToLevel(double xp, String rarity) { @@ -33,14 +31,19 @@ public class PetsCommand extends CommandBase { 1616700, 1746700, 1886700}; int levelOffset = 0; - if (rarity.equals("UNCOMMON")) { - levelOffset = 6; - } else if (rarity.equals("RARE")) { - levelOffset = 11; - } else if (rarity.equals("EPIC")) { - levelOffset = 16; - } else if (rarity.equals("LEGENDARY")) { - levelOffset = 20; + switch (rarity) { + case "UNCOMMON": + levelOffset = 6; + break; + case "RARE": + levelOffset = 11; + break; + case "EPIC": + levelOffset = 16; + break; + case "LEGENDARY": + levelOffset = 20; + break; } for (int i = levelOffset, xpAdded = 0; i < levelOffset + 99; i++) { @@ -84,7 +87,7 @@ public class PetsCommand extends CommandBase { // Check key String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); } // Get UUID for Hypixel API requests @@ -93,10 +96,10 @@ public class PetsCommand extends CommandBase { if (arg1.length == 0) { username = player.getName(); uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking pets of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking pets of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); } else { username = arg1[0]; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking pets of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking pets of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); uuid = APIHandler.getUUID(username); } @@ -109,57 +112,63 @@ public class PetsCommand extends CommandBase { JsonObject profileResponse = APIHandler.getResponse(profileURL); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.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(TheMod.ERROR_COLOUR + username + " has no pets.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + username + " has no pets.")); return; } System.out.println("Looping through pets..."); // Push each pet into list - List<JsonElement> sortedPets = new ArrayList<JsonElement>(); + List<JsonElement> sortedPets = new ArrayList<>(); for (JsonElement petElement : petsArray) { sortedPets.add(petElement); } // Sort pets by exp - Collections.sort(sortedPets, (pet1, pet2) -> { + sortedPets.sort((pet1, pet2) -> { double petXp1 = pet1.getAsJsonObject().get("exp").getAsDouble(); double petXp2 = pet2.getAsJsonObject().get("exp").getAsDouble(); return -Double.compare(petXp1, petXp2); }); // Sort pets into rarities - List<JsonObject> commonPets = new ArrayList<JsonObject>(); - List<JsonObject> uncommonPets = new ArrayList<JsonObject>(); - List<JsonObject> rarePets = new ArrayList<JsonObject>(); - List<JsonObject> epicPets = new ArrayList<JsonObject>(); - List<JsonObject> legendaryPets = new ArrayList<JsonObject>(); + List<JsonObject> commonPets = new ArrayList<>(); + List<JsonObject> uncommonPets = new ArrayList<>(); + List<JsonObject> rarePets = new ArrayList<>(); + List<JsonObject> epicPets = new ArrayList<>(); + List<JsonObject> legendaryPets = new ArrayList<>(); for (JsonElement petElement : sortedPets) { JsonObject pet = petElement.getAsJsonObject(); String rarity = pet.get("tier").getAsString(); - - if (rarity.equals("COMMON")) { - commonPets.add(pet); - } else if (rarity.equals("UNCOMMON")) { - uncommonPets.add(pet); - } else if (rarity.equals("RARE")) { - rarePets.add(pet); - } else if (rarity.equals("EPIC")) { - epicPets.add(pet); - } else if (rarity.equals("LEGENDARY")) { - legendaryPets.add(pet); + + switch (rarity) { + case "COMMON": + commonPets.add(pet); + break; + case "UNCOMMON": + uncommonPets.add(pet); + break; + case "RARE": + rarePets.add(pet); + break; + case "EPIC": + epicPets.add(pet); + break; + case "LEGENDARY": + legendaryPets.add(pet); + break; } } int totalPets = commonPets.size() + uncommonPets.size() + rarePets.size() + epicPets.size() + legendaryPets.size(); - String finalMessage = TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + String finalMessage = DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.AQUA + " " + username + "'s Pets (" + totalPets + "):\n"; // Loop through pet rarities @@ -167,7 +176,7 @@ public class PetsCommand extends CommandBase { String petName = Utils.capitalizeString(legPet.get("type").getAsString()); int level = petXpToLevel(legPet.get("exp").getAsDouble(), "LEGENDARY"); - String messageToAdd = ""; + String messageToAdd; if (legPet.get("active").getAsBoolean()) { messageToAdd = EnumChatFormatting.GOLD + " " + EnumChatFormatting.BOLD + ">>> Legendary " + petName + " (" + level + ") <<<"; } else { @@ -181,7 +190,7 @@ public class PetsCommand extends CommandBase { String petName = Utils.capitalizeString(epicPet.get("type").getAsString()); int level = petXpToLevel(epicPet.get("exp").getAsDouble(), "EPIC"); - String messageToAdd = ""; + String messageToAdd; if (epicPet.get("active").getAsBoolean()) { messageToAdd = EnumChatFormatting.DARK_PURPLE + " " + EnumChatFormatting.BOLD + ">>> Epic " + petName + " (" + level + ") <<<"; } else { @@ -195,7 +204,7 @@ public class PetsCommand extends CommandBase { String petName = Utils.capitalizeString(rarePet.get("type").getAsString()); int level = petXpToLevel(rarePet.get("exp").getAsDouble(), "RARE"); - String messageToAdd = ""; + String messageToAdd; if (rarePet.get("active").getAsBoolean()) { messageToAdd = EnumChatFormatting.BLUE + " " + EnumChatFormatting.BOLD + ">>> Rare " + petName + " (" + level + ") <<<"; } else { @@ -209,7 +218,7 @@ public class PetsCommand extends CommandBase { String petName = Utils.capitalizeString(uncommonPet.get("type").getAsString()); int level = petXpToLevel(uncommonPet.get("exp").getAsDouble(), "UNCOMMON"); - String messageToAdd = ""; + String messageToAdd; if (uncommonPet.get("active").getAsBoolean()) { messageToAdd = EnumChatFormatting.GREEN + " " + EnumChatFormatting.BOLD + ">>> Uncommon " + petName + " (" + level + ") <<<"; } else { @@ -223,7 +232,7 @@ public class PetsCommand extends CommandBase { String petName = Utils.capitalizeString(commonPet.get("type").getAsString()); int level = petXpToLevel(commonPet.get("exp").getAsDouble(), "COMMON"); - String messageToAdd = ""; + String messageToAdd; if (commonPet.get("active").getAsBoolean()) { messageToAdd = EnumChatFormatting.BOLD + ">>> Common " + petName + " (" + level + ") <<<"; } else { @@ -233,7 +242,7 @@ public class PetsCommand extends CommandBase { finalMessage += messageToAdd + "\n"; } - finalMessage += TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"; + finalMessage += DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"; player.addChatMessage(new ChatComponentText(finalMessage)); }).start(); diff --git a/src/main/java/me/Danker/commands/ReloadConfigCommand.java b/src/main/java/me/Danker/commands/ReloadConfigCommand.java index c4ad036..393d383 100644 --- a/src/main/java/me/Danker/commands/ReloadConfigCommand.java +++ b/src/main/java/me/Danker/commands/ReloadConfigCommand.java @@ -1,6 +1,6 @@ package me.Danker.commands; -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -29,7 +29,7 @@ public class ReloadConfigCommand extends CommandBase { public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { final EntityPlayer player = (EntityPlayer)arg0; ConfigHandler.reloadConfig(); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Reloaded config.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Reloaded config.")); } } diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java index 939ed6e..dc968e8 100644 --- a/src/main/java/me/Danker/commands/ResetLootCommand.java +++ b/src/main/java/me/Danker/commands/ResetLootCommand.java @@ -1,8 +1,6 @@ package me.Danker.commands; -import java.util.List; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -12,6 +10,8 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.util.List; + public class ResetLootCommand extends CommandBase { static String resetOption; @@ -48,7 +48,7 @@ public class ResetLootCommand extends CommandBase { final EntityPlayer player = (EntityPlayer) arg0; if (arg1.length == 0) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /resetloot <zombie/spider/wolf/fishing/mythological/catacombs>")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: /resetloot <zombie/spider/wolf/fishing/mythological/catacombs>")); return; } @@ -56,7 +56,7 @@ public class ResetLootCommand extends CommandBase { switch (arg1[0].toLowerCase()) { case "confirm": confirmReset = false; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Resetting " + resetOption + " tracker...")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Resetting " + resetOption + " tracker...")); switch (resetOption.toLowerCase()) { case "zombie": resetZombie(); @@ -78,11 +78,11 @@ public class ResetLootCommand extends CommandBase { System.err.println("Resetting unknown tracker."); return; } - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Reset complete.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Reset complete.")); break; case "cancel": confirmReset = false; - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Reset cancelled.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Reset cancelled.")); break; default: player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Please confirm the reset of the " + resetOption + " tracker by using /resetloot confirm." + @@ -98,16 +98,16 @@ public class ResetLootCommand extends CommandBase { case "catacombs": resetOption = arg1[0]; player.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Are you sure you want to reset the " + resetOption + " tracker?" + - " Confirm with " + TheMod.MAIN_COLOUR + "/resetloot confirm" + EnumChatFormatting.YELLOW + "." + - " Cancel by using " + TheMod.MAIN_COLOUR + "/resetloot cancel" + EnumChatFormatting.YELLOW + ".")); + " Confirm with " + DankersSkyblockMod.MAIN_COLOUR + "/resetloot confirm" + EnumChatFormatting.YELLOW + "." + + " Cancel by using " + DankersSkyblockMod.MAIN_COLOUR + "/resetloot cancel" + EnumChatFormatting.YELLOW + ".")); confirmReset = true; break; case "confirm": case "cancel": - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Pick something to reset first.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Pick something to reset first.")); break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); } } } diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java index 65239c5..85d0d5c 100644 --- a/src/main/java/me/Danker/commands/ScaleCommand.java +++ b/src/main/java/me/Danker/commands/ScaleCommand.java @@ -1,8 +1,6 @@ package me.Danker.commands; -import java.util.List; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -10,6 +8,9 @@ import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; +import sun.security.krb5.Config; + +import java.util.List; public class ScaleCommand extends CommandBase { @@ -20,6 +21,7 @@ public class ScaleCommand extends CommandBase { public static double lividHpScale; public static double cakeTimerScale; public static double skillTrackerScale; + public static double waterAnswerScale; @Override public String getCommandName() { @@ -28,7 +30,7 @@ public class ScaleCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker> <size (0.1 - 10)>"; + return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer> <size (0.1 - 10)>"; } @Override @@ -39,7 +41,7 @@ public class ScaleCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer"); } return null; } @@ -49,13 +51,13 @@ public class ScaleCommand extends CommandBase { final EntityPlayer player = (EntityPlayer) arg0; if (arg1.length < 2) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } - double scaleAmount = (double) Math.floor(Double.parseDouble(arg1[1]) * 100.0) / 100.0; + double scaleAmount = Math.floor(Double.parseDouble(arg1[1]) * 100.0) / 100.0; if (scaleAmount < 0.1 || scaleAmount > 10.0) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Scale multipler can only be between 0.1x and 10x.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Scale multipler can only be between 0.1x and 10x.")); return; } @@ -63,40 +65,45 @@ public class ScaleCommand extends CommandBase { case "coords": coordsScale = scaleAmount; ConfigHandler.writeDoubleConfig("scales", "coordsScale", coordsScale); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Coords have been scaled to " + TheMod.SECONDARY_COLOUR + coordsScale + "x")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Coords have been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + coordsScale + "x")); break; case "display": displayScale = scaleAmount; ConfigHandler.writeDoubleConfig("scales", "displayScale", displayScale); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Display has been scaled to " + TheMod.SECONDARY_COLOUR + displayScale + "x")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + displayScale + "x")); break; case "dungeontimer": dungeonTimerScale = scaleAmount; ConfigHandler.writeDoubleConfig("scales", "dungeonTimerScale", dungeonTimerScale); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Dungeon timer has been scaled to " + TheMod.SECONDARY_COLOUR + dungeonTimerScale + "x")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Dungeon timer has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + dungeonTimerScale + "x")); break; case "skill50": skill50Scale = scaleAmount; ConfigHandler.writeDoubleConfig("scales", "skill50Scale", skill50Scale); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill 50 display has been scaled to " + TheMod.SECONDARY_COLOUR + skill50Scale + "x")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill 50 display has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + skill50Scale + "x")); break; case "lividhp": lividHpScale = scaleAmount; ConfigHandler.writeDoubleConfig("scales", "lividHpScale", lividHpScale); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Livid HP has been scaled to " + TheMod.SECONDARY_COLOUR + lividHpScale + "x")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Livid HP has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + lividHpScale + "x")); break; case "caketimer": cakeTimerScale = scaleAmount; ConfigHandler.writeDoubleConfig("scales", "cakeTimerScale", cakeTimerScale); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Cake timer has been scaled to " + TheMod.SECONDARY_COLOUR + cakeTimerScale + "x")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Cake timer has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + cakeTimerScale + "x")); break; case "skilltracker": skillTrackerScale = scaleAmount; ConfigHandler.writeDoubleConfig("scales", "skillTrackerScale", skillTrackerScale); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker has been scaled to " + TheMod.SECONDARY_COLOUR + skillTrackerScale + "x")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + skillTrackerScale + "x")); + break; + case "wateranswer": + waterAnswerScale = scaleAmount; + ConfigHandler.writeDoubleConfig("scales", "waterAnswerScale", waterAnswerScale); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Water solver answer has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + waterAnswerScale + "x")); break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); } } diff --git a/src/main/java/me/Danker/commands/SetkeyCommand.java b/src/main/java/me/Danker/commands/SetkeyCommand.java index f2e58e5..db5fb9a 100644 --- a/src/main/java/me/Danker/commands/SetkeyCommand.java +++ b/src/main/java/me/Danker/commands/SetkeyCommand.java @@ -1,6 +1,6 @@ package me.Danker.commands; -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -31,12 +31,12 @@ public class SetkeyCommand extends CommandBase implements ICommand { final EntityPlayer player = (EntityPlayer)arg0; if (arg1.length == 0) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } ConfigHandler.writeStringConfig("api", "APIKey", arg1[0]); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Set API key to " + TheMod.SECONDARY_COLOUR + arg1[0])); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Set API key to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[0])); } } diff --git a/src/main/java/me/Danker/commands/SkillTrackerCommand.java b/src/main/java/me/Danker/commands/SkillTrackerCommand.java index 6e6d742..7642070 100644 --- a/src/main/java/me/Danker/commands/SkillTrackerCommand.java +++ b/src/main/java/me/Danker/commands/SkillTrackerCommand.java @@ -1,10 +1,6 @@ package me.Danker.commands; -import java.util.List; - -import org.apache.commons.lang3.time.StopWatch; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -12,6 +8,9 @@ import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; +import org.apache.commons.lang3.time.StopWatch; + +import java.util.List; public class SkillTrackerCommand extends CommandBase { @@ -43,51 +42,51 @@ public class SkillTrackerCommand extends CommandBase { EntityPlayer player = (EntityPlayer) arg0; if (arg1.length < 1) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } switch (arg1[0].toLowerCase()) { case "start": case "resume": - if (TheMod.skillStopwatch.isStarted() && TheMod.skillStopwatch.isSuspended()) { - TheMod.skillStopwatch.resume(); - } else if (!TheMod.skillStopwatch.isStarted()) { - TheMod.skillStopwatch.start(); + if (DankersSkyblockMod.skillStopwatch.isStarted() && DankersSkyblockMod.skillStopwatch.isSuspended()) { + DankersSkyblockMod.skillStopwatch.resume(); + } else if (!DankersSkyblockMod.skillStopwatch.isStarted()) { + DankersSkyblockMod.skillStopwatch.start(); } - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker started.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started.")); break; case "pause": case "stop": - if (TheMod.skillStopwatch.isStarted() && !TheMod.skillStopwatch.isSuspended()) { - TheMod.skillStopwatch.suspend(); + if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) { + DankersSkyblockMod.skillStopwatch.suspend(); } else { - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker paused.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker paused.")); } break; case "reset": - TheMod.skillStopwatch = new StopWatch(); - TheMod.farmingXPGained = 0; - TheMod.miningXPGained = 0; - TheMod.combatXPGained = 0; - TheMod.foragingXPGained = 0; - TheMod.fishingXPGained = 0; - TheMod.enchantingXPGained = 0; - TheMod.alchemyXPGained = 0; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker reset.")); + DankersSkyblockMod.skillStopwatch = new StopWatch(); + DankersSkyblockMod.farmingXPGained = 0; + DankersSkyblockMod.miningXPGained = 0; + DankersSkyblockMod.combatXPGained = 0; + DankersSkyblockMod.foragingXPGained = 0; + DankersSkyblockMod.fishingXPGained = 0; + DankersSkyblockMod.enchantingXPGained = 0; + DankersSkyblockMod.alchemyXPGained = 0; + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker reset.")); break; case "hide": - TheMod.showSkillTracker = false; + DankersSkyblockMod.showSkillTracker = false; ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker hidden.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker hidden.")); break; case "show": - TheMod.showSkillTracker = true; + DankersSkyblockMod.showSkillTracker = true; ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker shown.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker shown.")); break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); } } diff --git a/src/main/java/me/Danker/commands/SkillsCommand.java b/src/main/java/me/Danker/commands/SkillsCommand.java index 71905fc..2d5cf78 100644 --- a/src/main/java/me/Danker/commands/SkillsCommand.java +++ b/src/main/java/me/Danker/commands/SkillsCommand.java @@ -1,10 +1,7 @@ package me.Danker.commands; -import java.util.List; - import com.google.gson.JsonObject; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -16,6 +13,8 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.util.List; + public class SkillsCommand extends CommandBase { @Override @@ -50,7 +49,7 @@ public class SkillsCommand extends CommandBase { // Check key String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); } // Get UUID for Hypixel API requests @@ -59,10 +58,10 @@ public class SkillsCommand extends CommandBase { if (arg1.length == 0) { username = player.getName(); uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking skills of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking skills of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); } else { username = arg1[0]; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking skills of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking skills of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); uuid = APIHandler.getUUID(username); } @@ -75,7 +74,7 @@ public class SkillsCommand extends CommandBase { JsonObject profileResponse = APIHandler.getResponse(profileURL); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } @@ -113,7 +112,7 @@ public class SkillsCommand extends CommandBase { fishingLevel = (double) Math.round(fishingLevel * 100) / 100; } if (userObject.has("experience_skill_enchanting")) { - enchantingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_enchanting").getAsDouble(), 50); + enchantingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_enchanting").getAsDouble(), 60); enchantingLevel = (double) Math.round(enchantingLevel * 100) / 100; } if (userObject.has("experience_skill_alchemy")) { @@ -133,7 +132,7 @@ public class SkillsCommand extends CommandBase { if (!playerObject.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } @@ -154,7 +153,7 @@ public class SkillsCommand extends CommandBase { fishingLevel = Math.min(achievementObject.get("skyblock_angler").getAsInt(), 50); } if (achievementObject.has("skyblock_augmentation")) { - enchantingLevel = Math.min(achievementObject.get("skyblock_augmentation").getAsInt(), 50); + enchantingLevel = achievementObject.get("skyblock_augmentation").getAsInt(); } if (achievementObject.has("skyblock_concoctor")) { alchemyLevel = Math.min(achievementObject.get("skyblock_concoctor").getAsInt(), 50); @@ -168,19 +167,19 @@ public class SkillsCommand extends CommandBase { skillAvg = (double) Math.round(skillAvg * 100) / 100; double trueAvg = (Math.floor(farmingLevel) + Math.floor(miningLevel) + Math.floor(combatLevel) + Math.floor(foragingLevel) + Math.floor(fishingLevel) + Math.floor(enchantingLevel) + Math.floor(alchemyLevel) + Math.floor(tamingLevel)) / 8; - player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.AQUA + " " + username + "'s Skills:\n" + - TheMod.TYPE_COLOUR + " Farming: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + farmingLevel + "\n" + - TheMod.TYPE_COLOUR + " Mining: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + miningLevel + "\n" + - TheMod.TYPE_COLOUR + " Combat: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + combatLevel + "\n" + - TheMod.TYPE_COLOUR + " Foraging: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + foragingLevel + "\n" + - TheMod.TYPE_COLOUR + " Fishing: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + fishingLevel + "\n" + - TheMod.TYPE_COLOUR + " Enchanting: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + enchantingLevel + "\n" + - TheMod.TYPE_COLOUR + " Alchemy: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + alchemyLevel + "\n" + - TheMod.TYPE_COLOUR + " Taming: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + tamingLevel + "\n" + - EnumChatFormatting.AQUA + " Average Skill Level: " + TheMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + skillAvg + "\n" + - EnumChatFormatting.AQUA + " True Average Skill Level: " + TheMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + trueAvg + "\n" + - TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); + DankersSkyblockMod.TYPE_COLOUR + " Farming: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + farmingLevel + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Mining: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + miningLevel + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Combat: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + combatLevel + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Foraging: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + foragingLevel + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Fishing: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + fishingLevel + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Enchanting: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + enchantingLevel + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Alchemy: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + alchemyLevel + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Taming: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + tamingLevel + "\n" + + EnumChatFormatting.AQUA + " Average Skill Level: " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + skillAvg + "\n" + + EnumChatFormatting.AQUA + " True Average Skill Level: " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + trueAvg + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); }).start(); } diff --git a/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java b/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java index aca61ee..9558d7d 100644 --- a/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java +++ b/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java @@ -1,13 +1,7 @@ package me.Danker.commands; -import java.text.NumberFormat; -import java.util.Collections; -import java.util.List; -import java.util.Locale; - import com.google.gson.JsonObject; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -18,6 +12,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.text.NumberFormat; +import java.util.Collections; +import java.util.List; +import java.util.Locale; + public class SkyblockPlayersCommand extends CommandBase { @Override @@ -49,7 +48,7 @@ public class SkyblockPlayersCommand extends CommandBase { // Check key String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); } String playersURL = "https://api.hypixel.net/gameCounts?key=" + key; @@ -57,7 +56,7 @@ public class SkyblockPlayersCommand extends CommandBase { JsonObject playersResponse = APIHandler.getResponse(playersURL); if (!playersResponse.get("success").getAsBoolean()) { String reason = playersResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } @@ -126,24 +125,24 @@ public class SkyblockPlayersCommand extends CommandBase { } NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); - player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + - TheMod.TYPE_COLOUR + " Hypixel: " + TheMod.VALUE_COLOUR + nf.format(totalPlayers) + "\n" + - TheMod.TYPE_COLOUR + " Skyblock: " + TheMod.VALUE_COLOUR + nf.format(skyblockTotalPlayers) + " / " + Utils.getPercentage(skyblockTotalPlayers, totalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Private Island: " + TheMod.VALUE_COLOUR + nf.format(privateIsland) + " / " + Utils.getPercentage(privateIsland, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Hub: " + TheMod.VALUE_COLOUR + nf.format(hub) + " / " + Utils.getPercentage(hub, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Barn: " + TheMod.VALUE_COLOUR + nf.format(barn) + " / " + Utils.getPercentage(barn, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Mushroom Desert: " + TheMod.VALUE_COLOUR + nf.format(mushroomDesert) + " / " + Utils.getPercentage(mushroomDesert, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Park: " + TheMod.VALUE_COLOUR + nf.format(park) + " / " + Utils.getPercentage(park, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Gold Mine: " + TheMod.VALUE_COLOUR + nf.format(goldMine) + " / " + Utils.getPercentage(goldMine, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Deep Caverns: " + TheMod.VALUE_COLOUR + nf.format(deepCaverns) + " / " + Utils.getPercentage(deepCaverns, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Spider's Den: " + TheMod.VALUE_COLOUR + nf.format(spidersDen) + " / " + Utils.getPercentage(spidersDen, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Blazing Fortress: " + TheMod.VALUE_COLOUR + nf.format(blazingFortress) + " / " + Utils.getPercentage(blazingFortress, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " The End: " + TheMod.VALUE_COLOUR + nf.format(end) + " / " + Utils.getPercentage(end, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Dungeons Hub: " + TheMod.VALUE_COLOUR + nf.format(dungeonsHub) + " / " + Utils.getPercentage(dungeonsHub, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Dungeons: " + TheMod.VALUE_COLOUR + nf.format(dungeons) + " / " + Utils.getPercentage(dungeons, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Dark Auction: " + TheMod.VALUE_COLOUR + nf.format(darkAuction) + " / " + Utils.getPercentage(darkAuction, skyblockTotalPlayers) + "%\n" + - TheMod.TYPE_COLOUR + " Jerry's Workshop: " + TheMod.VALUE_COLOUR + nf.format(jerry) + " / " + Utils.getPercentage(jerry, skyblockTotalPlayers) + "%\n" + - TheMod.DELIMITER_COLOUR + EnumChatFormatting.BOLD + " -------------------")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + DankersSkyblockMod.TYPE_COLOUR + " Hypixel: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(totalPlayers) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Skyblock: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(skyblockTotalPlayers) + " / " + Utils.getPercentage(skyblockTotalPlayers, totalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Private Island: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(privateIsland) + " / " + Utils.getPercentage(privateIsland, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Hub: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(hub) + " / " + Utils.getPercentage(hub, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Barn: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(barn) + " / " + Utils.getPercentage(barn, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Mushroom Desert: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(mushroomDesert) + " / " + Utils.getPercentage(mushroomDesert, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Park: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(park) + " / " + Utils.getPercentage(park, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Gold Mine: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(goldMine) + " / " + Utils.getPercentage(goldMine, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Deep Caverns: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(deepCaverns) + " / " + Utils.getPercentage(deepCaverns, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Spider's Den: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(spidersDen) + " / " + Utils.getPercentage(spidersDen, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Blazing Fortress: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(blazingFortress) + " / " + Utils.getPercentage(blazingFortress, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " The End: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(end) + " / " + Utils.getPercentage(end, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Dungeons Hub: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(dungeonsHub) + " / " + Utils.getPercentage(dungeonsHub, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Dungeons: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(dungeons) + " / " + Utils.getPercentage(dungeons, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Dark Auction: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(darkAuction) + " / " + Utils.getPercentage(darkAuction, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Jerry's Workshop: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(jerry) + " / " + Utils.getPercentage(jerry, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.DELIMITER_COLOUR + EnumChatFormatting.BOLD + " -------------------")); }).start(); } diff --git a/src/main/java/me/Danker/commands/SlayerCommand.java b/src/main/java/me/Danker/commands/SlayerCommand.java index 07119bb..6c83934 100644 --- a/src/main/java/me/Danker/commands/SlayerCommand.java +++ b/src/main/java/me/Danker/commands/SlayerCommand.java @@ -1,12 +1,7 @@ package me.Danker.commands; -import java.text.NumberFormat; -import java.util.List; -import java.util.Locale; - import com.google.gson.JsonObject; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -18,6 +13,10 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.text.NumberFormat; +import java.util.List; +import java.util.Locale; + public class SlayerCommand extends CommandBase { @Override @@ -52,7 +51,7 @@ public class SlayerCommand extends CommandBase { // Check key String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); } // Get UUID for Hypixel API requests @@ -61,10 +60,10 @@ public class SlayerCommand extends CommandBase { if (arg1.length == 0) { username = player.getName(); uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking slayer of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking slayer of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); } else { username = arg1[0]; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking slayer of " + TheMod.SECONDARY_COLOUR + username)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking slayer of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); uuid = APIHandler.getUUID(username); } @@ -77,7 +76,7 @@ public class SlayerCommand extends CommandBase { JsonObject profileResponse = APIHandler.getResponse(profileURL); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } @@ -100,12 +99,12 @@ public class SlayerCommand extends CommandBase { } NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); - player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.AQUA + " " + username + "'s Total XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + nf.format(zombieXP + spiderXP + wolfXP) + "\n" + - TheMod.TYPE_COLOUR + " Zombie XP: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(zombieXP) + "\n" + - TheMod.TYPE_COLOUR + " Spider XP: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(spiderXP) + "\n" + - TheMod.TYPE_COLOUR + " Wolf XP: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(wolfXP) + "\n" + - TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); + DankersSkyblockMod.TYPE_COLOUR + " Zombie XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(zombieXP) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Spider XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(spiderXP) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Wolf XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(wolfXP) + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); }).start(); } diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 51503ed..5c473e5 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -1,8 +1,6 @@ package me.Danker.commands; -import java.util.List; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -12,6 +10,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; +import java.util.List; + public class ToggleCommand extends CommandBase implements ICommand { public static boolean gpartyToggled; public static boolean coordsToggled; @@ -31,20 +31,28 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean skill50DisplayToggled; public static boolean outlineTextToggled; public static boolean midasStaffMessages; + public static boolean implosionMessages; public static boolean healMessages; public static boolean cakeTimerToggled; public static boolean lowHealthNotifyToggled; public static boolean lividSolverToggled; + public static boolean stopSalvageStarredToggled; // Puzzle Solvers public static boolean threeManToggled; public static boolean oruoToggled; public static boolean blazeToggled; public static boolean creeperToggled; public static boolean waterToggled; + public static boolean ticTacToeToggled; // Terminal Helpers public static boolean startsWithToggled; public static boolean selectAllToggled; public static boolean itemFrameOnSeaLanternsToggled; + // Experiments + public static boolean ultrasequencerToggled; + public static boolean chronomatronToggled; + public static boolean superpairsToggled; + public static boolean swapToPickBlockInExperimentsToggled; @Override public String getCommandName() { @@ -55,9 +63,9 @@ public class ToggleCommand extends CommandBase implements ICommand { public String getCommandUsage(ICommandSender arg0) { return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/" + "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + - "outlinetext/midasstaffmessages/healmessages/caketimer/lowhealthnotify/lividsolver/threemanpuzzle/oruopuzzle/" + - "blazepuzzle/creeperpuzzle/waterpuzzle/startswithterminal/selectallterminal/" + - "itemframeonsealanterns/list>"; + "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + + "lividsolver/stopsalvagestarred/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + + "startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/pickblockinexperiments/list>"; } @Override @@ -72,9 +80,11 @@ public class ToggleCommand extends CommandBase implements ICommand { "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", - "healmessages", "caketimer", "lowhealthnotify", "lividsolver", "threemanpuzzle", - "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "startswithterminal", - "selectallterminal", "itemframeonsealanterns", "list"); + "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", + "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", + "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "startswithterminal", + "selectallterminal", "itemframeonsealanterns", "ultrasequencer", + "chronomatron", "superpairs", "pickblockinexperiments", "list"); } return null; } @@ -84,7 +94,7 @@ public class ToggleCommand extends CommandBase implements ICommand { final EntityPlayer player = (EntityPlayer)arg0; if (arg1.length == 0) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } @@ -92,187 +102,229 @@ public class ToggleCommand extends CommandBase implements ICommand { case "gparty": gpartyToggled = !gpartyToggled; ConfigHandler.writeBooleanConfig("toggles", "GParty", gpartyToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Guild party notifications has been set to " + TheMod.SECONDARY_COLOUR + gpartyToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Guild party notifications has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + gpartyToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "coords": coordsToggled = !coordsToggled; ConfigHandler.writeBooleanConfig("toggles", "Coords", coordsToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Coord/Angle display has been set to " + TheMod.SECONDARY_COLOUR + coordsToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Coord/Angle display has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + coordsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "golden": goldenToggled = !goldenToggled; ConfigHandler.writeBooleanConfig("toggles", "Golden", goldenToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Golden T6 enchants has been set to " + TheMod.SECONDARY_COLOUR + goldenToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Golden T6 enchants has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + goldenToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "slayercount": slayerCountTotal = !slayerCountTotal; ConfigHandler.writeBooleanConfig("toggles", "SlayerCount", slayerCountTotal); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Counting total 20% slayer drops has been set to " + TheMod.SECONDARY_COLOUR + slayerCountTotal + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Counting total 20% slayer drops has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + slayerCountTotal + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "rngesusalerts": rngesusAlerts = !rngesusAlerts; ConfigHandler.writeBooleanConfig("toggles", "RNGesusAlerts", rngesusAlerts); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Slayer RNGesus alerts has been set to " + TheMod.SECONDARY_COLOUR + rngesusAlerts + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Slayer RNGesus alerts has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + rngesusAlerts + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "splitfishing": splitFishing = !splitFishing; ConfigHandler.writeBooleanConfig("toggles", "SplitFishing", splitFishing); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Split fishing display has been set to " + TheMod.SECONDARY_COLOUR + splitFishing + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Split fishing display has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + splitFishing + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "chatmaddox": chatMaddoxToggled = !chatMaddoxToggled; ConfigHandler.writeBooleanConfig("toggles", "ChatMaddox", chatMaddoxToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Click screen to open Maddox menu has been set to " + TheMod.SECONDARY_COLOUR + chatMaddoxToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Click screen to open Maddox menu has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + chatMaddoxToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "spiritbearalerts": spiritBearAlerts = !spiritBearAlerts; ConfigHandler.writeBooleanConfig("toggles", "SpiritBearAlerts", spiritBearAlerts); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Spirit Bear alerts have been set to " + TheMod.SECONDARY_COLOUR + spiritBearAlerts + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Spirit Bear alerts have been set to " + DankersSkyblockMod.SECONDARY_COLOUR + spiritBearAlerts + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "aotd": aotdToggled = !aotdToggled; ConfigHandler.writeBooleanConfig("toggles", "AOTD", aotdToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Block AOTD ability been set to " + TheMod.SECONDARY_COLOUR + aotdToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Block AOTD ability been set to " + DankersSkyblockMod.SECONDARY_COLOUR + aotdToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "lividdagger": lividDaggerToggled = !lividDaggerToggled; ConfigHandler.writeBooleanConfig("toggles", "LividDagger", lividDaggerToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Block Livid Dagger ability been set to " + TheMod.SECONDARY_COLOUR + lividDaggerToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Block Livid Dagger ability been set to " + DankersSkyblockMod.SECONDARY_COLOUR + lividDaggerToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "sceptremessages": sceptreMessages = !sceptreMessages; ConfigHandler.writeBooleanConfig("toggles", "SceptreMessages", sceptreMessages); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Spirit Sceptre messages have been set to " + TheMod.SECONDARY_COLOUR + sceptreMessages + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Spirit Sceptre messages have been set to " + DankersSkyblockMod.SECONDARY_COLOUR + sceptreMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "midasstaffmessages": + midasStaffMessages = !midasStaffMessages; + ConfigHandler.writeBooleanConfig("toggles", "MidasStaffMessages", midasStaffMessages); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Midas Staff messages have been set to " + DankersSkyblockMod.SECONDARY_COLOUR + midasStaffMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "implosionmessages": + implosionMessages = !implosionMessages; + ConfigHandler.writeBooleanConfig("toggles", "ImplosionMessages", implosionMessages); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Implosion messages have been set to " + DankersSkyblockMod.SECONDARY_COLOUR + implosionMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "healmessages": + healMessages = !healMessages; + ConfigHandler.writeBooleanConfig("toggles", "HealMessages", healMessages); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Heal messages have been set to " + DankersSkyblockMod.SECONDARY_COLOUR + healMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "petcolors": case "petcolours": petColoursToggled = !petColoursToggled; ConfigHandler.writeBooleanConfig("toggles", "PetColors", petColoursToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Pet colours have been set to " + TheMod.SECONDARY_COLOUR + petColoursToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Pet colours have been set to " + DankersSkyblockMod.SECONDARY_COLOUR + petColoursToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "dungeontimer": dungeonTimerToggled = !dungeonTimerToggled; ConfigHandler.writeBooleanConfig("toggles", "DungeonTimer", dungeonTimerToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Dungeon timer has been set to " + TheMod.SECONDARY_COLOUR + dungeonTimerToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Dungeon timer has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + dungeonTimerToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "golemalerts": golemAlertToggled = !golemAlertToggled; ConfigHandler.writeBooleanConfig("toggles", "GolemAlerts", golemAlertToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Golem spawn alerts has been set to " + TheMod.SECONDARY_COLOUR + golemAlertToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Golem spawn alerts has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + golemAlertToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "expertiselore": expertiseLoreToggled = !expertiseLoreToggled; ConfigHandler.writeBooleanConfig("toggles", "ExpertiseLore", expertiseLoreToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Expertise in lore has been set to " + TheMod.SECONDARY_COLOUR + expertiseLoreToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Expertise in lore has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + expertiseLoreToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "skill50display": skill50DisplayToggled = !skill50DisplayToggled; ConfigHandler.writeBooleanConfig("toggles", "Skill50Display", skill50DisplayToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill 50 display has been set to " + TheMod.SECONDARY_COLOUR + skill50DisplayToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill 50 display has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + skill50DisplayToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "outlinetext": outlineTextToggled = !outlineTextToggled; ConfigHandler.writeBooleanConfig("toggles", "OutlineText", outlineTextToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Outline displayed text has been set to " + TheMod.SECONDARY_COLOUR + outlineTextToggled + TheMod.MAIN_COLOUR + ".")); - break; - case "midasstaffmessages": - midasStaffMessages = !midasStaffMessages; - ConfigHandler.writeBooleanConfig("toggles", "MidasStaffMessages", midasStaffMessages); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Midas Staff messages have been set to " + TheMod.SECONDARY_COLOUR + midasStaffMessages + TheMod.MAIN_COLOUR + ".")); - break; - case "healmessages": - healMessages = !healMessages; - ConfigHandler.writeBooleanConfig("toggles", "HealMessages", healMessages); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Heal messages have been set to " + TheMod.SECONDARY_COLOUR + healMessages + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Outline displayed text has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + outlineTextToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "caketimer": cakeTimerToggled = !cakeTimerToggled; ConfigHandler.writeBooleanConfig("toggles", "CakeTimer", cakeTimerToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Cake timer has been set to " + TheMod.SECONDARY_COLOUR + cakeTimerToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Cake timer has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + cakeTimerToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "lowhealthnotify": lowHealthNotifyToggled = !lowHealthNotifyToggled; ConfigHandler.writeBooleanConfig("toggles", "LowHealthNotify", lowHealthNotifyToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Low health notify has been set to " + TheMod.SECONDARY_COLOUR + lowHealthNotifyToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Low health notify has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + lowHealthNotifyToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "lividsolver": lividSolverToggled = !lividSolverToggled; ConfigHandler.writeBooleanConfig("toggles", "LividSolver", lividSolverToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Livid solver has been set to " + TheMod.SECONDARY_COLOUR + lividSolverToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Livid solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + lividSolverToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "stopsalvagestarred": + stopSalvageStarredToggled = !stopSalvageStarredToggled; + ConfigHandler.writeBooleanConfig("toggles", "StopSalvageStarred", stopSalvageStarredToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Stop salvaging starred items has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + stopSalvageStarredToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "threemanpuzzle": threeManToggled = !threeManToggled; ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Three man puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + threeManToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Three man puzzle solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + threeManToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "oruopuzzle": oruoToggled = !oruoToggled; ConfigHandler.writeBooleanConfig("toggles", "OruoPuzzle", oruoToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Oruo trivia solver has been set to " + TheMod.SECONDARY_COLOUR + oruoToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Oruo trivia solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + oruoToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "blazepuzzle": blazeToggled = !blazeToggled; ConfigHandler.writeBooleanConfig("toggles", "BlazePuzzle", blazeToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Blaze puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + blazeToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Blaze puzzle solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + blazeToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "creeperpuzzle": creeperToggled = !creeperToggled; ConfigHandler.writeBooleanConfig("toggles", "CreeperPuzzle", creeperToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Creeper puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + creeperToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Creeper puzzle solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + creeperToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "waterpuzzle": waterToggled = !waterToggled; ConfigHandler.writeBooleanConfig("toggles", "WaterPuzzle", waterToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Water puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + waterToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Water puzzle solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + waterToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "tictactoepuzzle": + ticTacToeToggled = !ticTacToeToggled; + ConfigHandler.writeBooleanConfig("toggles", "TicTacToePuzzle", ticTacToeToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Tic tac toe puzzle solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + ticTacToeToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "startswithterminal": startsWithToggled = !startsWithToggled; ConfigHandler.writeBooleanConfig("toggles", "StartsWithTerminal", startsWithToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Starts with letter terminal solver has been set to " + TheMod.SECONDARY_COLOUR + startsWithToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Starts with letter terminal solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + startsWithToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "selectallterminal": selectAllToggled = !selectAllToggled; ConfigHandler.writeBooleanConfig("toggles", "SelectAllTerminal", selectAllToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Select all color items terminal solver has been set to " + TheMod.SECONDARY_COLOUR + selectAllToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Select all color items terminal solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + selectAllToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "itemframeonsealanterns": itemFrameOnSeaLanternsToggled = !itemFrameOnSeaLanternsToggled; ConfigHandler.writeBooleanConfig("toggles", "IgnoreItemFrameOnSeaLanterns", itemFrameOnSeaLanternsToggled); - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Ignore item frames on sea lanterns has been set to " + TheMod.SECONDARY_COLOUR + itemFrameOnSeaLanternsToggled + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Ignore item frames on sea lanterns has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + itemFrameOnSeaLanternsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "ultrasequencer": + ultrasequencerToggled = !ultrasequencerToggled; + ConfigHandler.writeBooleanConfig("toggles", "UltraSequencer", ultrasequencerToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Ultrasequencer solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + ultrasequencerToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "chronomatron": + chronomatronToggled = !chronomatronToggled; + ConfigHandler.writeBooleanConfig("toggles", "Chronomatron", chronomatronToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Chronomatron solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + chronomatronToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "superpairs": + superpairsToggled = !superpairsToggled; + ConfigHandler.writeBooleanConfig("toggles", "Superpairs", superpairsToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Superpairs solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + superpairsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "pickblockinexperiments": + swapToPickBlockInExperimentsToggled = !swapToPickBlockInExperimentsToggled; + ConfigHandler.writeBooleanConfig("toggles", "PickBlockInExperiments", superpairsToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto-swap to pick block in experiments has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + swapToPickBlockInExperimentsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "list": - player.addChatMessage(new ChatComponentText(TheMod.TYPE_COLOUR + "Guild party notifications: " + TheMod.VALUE_COLOUR + gpartyToggled + "\n" + - TheMod.TYPE_COLOUR + " Coord/Angle display: " + TheMod.VALUE_COLOUR + coordsToggled + "\n" + - TheMod.TYPE_COLOUR + " Golden T6 enchants: " + TheMod.VALUE_COLOUR + goldenToggled + "\n" + - TheMod.TYPE_COLOUR + " Counting total 20% slayer drops: " + TheMod.VALUE_COLOUR + slayerCountTotal + "\n" + - TheMod.TYPE_COLOUR + " Slayer RNGesus alerts: " + TheMod.VALUE_COLOUR + rngesusAlerts + "\n" + - TheMod.TYPE_COLOUR + " Split fishing display: " + TheMod.VALUE_COLOUR + splitFishing + "\n" + - TheMod.TYPE_COLOUR + " Chat Maddox menu: " + TheMod.VALUE_COLOUR + chatMaddoxToggled + "\n" + - TheMod.TYPE_COLOUR + " Spirit Bear alerts: " + TheMod.VALUE_COLOUR + spiritBearAlerts + "\n" + - TheMod.TYPE_COLOUR + " Block AOTD ability: " + TheMod.VALUE_COLOUR + aotdToggled + "\n" + - TheMod.TYPE_COLOUR + " Block Livid Dagger ability: " + TheMod.VALUE_COLOUR + lividDaggerToggled + "\n" + - TheMod.TYPE_COLOUR + " Spirit Sceptre messages: " + TheMod.VALUE_COLOUR + sceptreMessages + "\n" + - TheMod.TYPE_COLOUR + " Pet colours: " + TheMod.VALUE_COLOUR + petColoursToggled + "\n" + - TheMod.TYPE_COLOUR + " Dungeon timer: " + TheMod.VALUE_COLOUR + dungeonTimerToggled + "\n" + - TheMod.TYPE_COLOUR + " Golem spawn alerts: " + TheMod.VALUE_COLOUR + golemAlertToggled + "\n" + - TheMod.TYPE_COLOUR + " Expertise in lore: " + TheMod.VALUE_COLOUR + expertiseLoreToggled + "\n" + - TheMod.TYPE_COLOUR + " Skill 50 display: " + TheMod.VALUE_COLOUR + skill50DisplayToggled + "\n" + - TheMod.TYPE_COLOUR + " Outline displayed text: " + TheMod.VALUE_COLOUR + outlineTextToggled + "\n" + - TheMod.TYPE_COLOUR + " Midas Staff messages: " + TheMod.VALUE_COLOUR + midasStaffMessages + "\n" + - TheMod.TYPE_COLOUR + " Heal messages: " + TheMod.VALUE_COLOUR + healMessages + "\n" + - TheMod.TYPE_COLOUR + " Cake timer: " + TheMod.VALUE_COLOUR + cakeTimerToggled + "\n" + - TheMod.TYPE_COLOUR + " Low health notify: " + TheMod.VALUE_COLOUR + lowHealthNotifyToggled + "\n" + - TheMod.TYPE_COLOUR + " Livid solver: " + TheMod.VALUE_COLOUR + lividSolverToggled + "\n" + - TheMod.TYPE_COLOUR + " Three man puzzle solver: " + TheMod.VALUE_COLOUR + threeManToggled + "\n" + - TheMod.TYPE_COLOUR + " Oruo trivia solver: " + TheMod.VALUE_COLOUR + oruoToggled + "\n" + - TheMod.TYPE_COLOUR + " Blaze puzzle solver: " + TheMod.VALUE_COLOUR + blazeToggled + "\n" + - TheMod.TYPE_COLOUR + " Creeper puzzle solver: " + TheMod.VALUE_COLOUR + creeperToggled + "\n" + - TheMod.TYPE_COLOUR + " Water puzzle solver: " + TheMod.VALUE_COLOUR + waterToggled + "\n" + - TheMod.TYPE_COLOUR + " Starts with letter terminal solver: " + TheMod.VALUE_COLOUR + startsWithToggled + "\n" + - TheMod.TYPE_COLOUR + " Select all color items terminal solver: " + TheMod.VALUE_COLOUR + selectAllToggled + "\n" + - TheMod.TYPE_COLOUR + " Ignore item frames on sea lanterns: " + TheMod.VALUE_COLOUR + itemFrameOnSeaLanternsToggled)); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.TYPE_COLOUR + "Guild party notifications: " + DankersSkyblockMod.VALUE_COLOUR + gpartyToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Coord/Angle display: " + DankersSkyblockMod.VALUE_COLOUR + coordsToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Golden T6 enchants: " + DankersSkyblockMod.VALUE_COLOUR + goldenToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Counting total 20% slayer drops: " + DankersSkyblockMod.VALUE_COLOUR + slayerCountTotal + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Slayer RNGesus alerts: " + DankersSkyblockMod.VALUE_COLOUR + rngesusAlerts + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Split fishing display: " + DankersSkyblockMod.VALUE_COLOUR + splitFishing + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Chat Maddox menu: " + DankersSkyblockMod.VALUE_COLOUR + chatMaddoxToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Spirit Bear alerts: " + DankersSkyblockMod.VALUE_COLOUR + spiritBearAlerts + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Block AOTD ability: " + DankersSkyblockMod.VALUE_COLOUR + aotdToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Block Livid Dagger ability: " + DankersSkyblockMod.VALUE_COLOUR + lividDaggerToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Spirit Sceptre messages: " + DankersSkyblockMod.VALUE_COLOUR + sceptreMessages + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Midas Staff messages: " + DankersSkyblockMod.VALUE_COLOUR + midasStaffMessages + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Implosion messages: " + DankersSkyblockMod.VALUE_COLOUR + implosionMessages + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Heal messages: " + DankersSkyblockMod.VALUE_COLOUR + healMessages + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Pet colours: " + DankersSkyblockMod.VALUE_COLOUR + petColoursToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Dungeon timer: " + DankersSkyblockMod.VALUE_COLOUR + dungeonTimerToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Golem spawn alerts: " + DankersSkyblockMod.VALUE_COLOUR + golemAlertToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Expertise in lore: " + DankersSkyblockMod.VALUE_COLOUR + expertiseLoreToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Skill 50 display: " + DankersSkyblockMod.VALUE_COLOUR + skill50DisplayToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Outline displayed text: " + DankersSkyblockMod.VALUE_COLOUR + outlineTextToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Cake timer: " + DankersSkyblockMod.VALUE_COLOUR + cakeTimerToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Low health notify: " + DankersSkyblockMod.VALUE_COLOUR + lowHealthNotifyToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Livid solver: " + DankersSkyblockMod.VALUE_COLOUR + lividSolverToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Three man puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + threeManToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Oruo trivia solver: " + DankersSkyblockMod.VALUE_COLOUR + oruoToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Blaze puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + blazeToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Creeper puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + creeperToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Water puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + waterToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Tic tac toe puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + ticTacToeToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Starts with letter terminal solver: " + DankersSkyblockMod.VALUE_COLOUR + startsWithToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Select all color items terminal solver: " + DankersSkyblockMod.VALUE_COLOUR + selectAllToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Ignore item frames on sea lanterns: " + DankersSkyblockMod.VALUE_COLOUR + itemFrameOnSeaLanternsToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Ultra sequencer solver: " + DankersSkyblockMod.VALUE_COLOUR + ultrasequencerToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Chronomatron solver: " + DankersSkyblockMod.VALUE_COLOUR + chronomatronToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Superpairs solver: " + DankersSkyblockMod.VALUE_COLOUR + superpairsToggled + )); + break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); } } } |