diff options
Diffstat (limited to 'src/main/java/me/Danker/commands')
30 files changed, 2642 insertions, 988 deletions
diff --git a/src/main/java/me/Danker/commands/ArmourCommand.java b/src/main/java/me/Danker/commands/ArmourCommand.java index 4597309..e9a20ee 100644 --- a/src/main/java/me/Danker/commands/ArmourCommand.java +++ b/src/main/java/me/Danker/commands/ArmourCommand.java @@ -67,6 +67,7 @@ public class ArmourCommand extends CommandBase { String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey.")); + return; } // Get UUID for Hypixel API requests @@ -88,7 +89,7 @@ public class ArmourCommand extends CommandBase { String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); - JsonObject profileResponse = APIHandler.getResponse(profileURL); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); diff --git a/src/main/java/me/Danker/commands/BankCommand.java b/src/main/java/me/Danker/commands/BankCommand.java index ddf9502..e4a8eee 100644 --- a/src/main/java/me/Danker/commands/BankCommand.java +++ b/src/main/java/me/Danker/commands/BankCommand.java @@ -62,6 +62,7 @@ public class BankCommand extends CommandBase { String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey.")); + return; } // Get UUID for Hypixel API requests @@ -83,7 +84,7 @@ public class BankCommand extends CommandBase { String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); - JsonObject profileResponse = APIHandler.getResponse(profileURL); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason)); diff --git a/src/main/java/me/Danker/commands/BlockSlayerCommand.java b/src/main/java/me/Danker/commands/BlockSlayerCommand.java new file mode 100644 index 0000000..37047c9 --- /dev/null +++ b/src/main/java/me/Danker/commands/BlockSlayerCommand.java @@ -0,0 +1,111 @@ +package me.Danker.commands; + +import me.Danker.DankersSkyblockMod; +import me.Danker.features.BlockWrongSlayer; +import me.Danker.handlers.ConfigHandler; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +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 { + + @Override + public String getCommandName() { + return "onlyslayer"; + } + + @Override + public String getCommandUsage(ICommandSender arg0) { + return "/" + getCommandName() + " <zombie/spider/wolf/enderman/blaze> <1/2/3/4/5>"; + } + + public static String usage(ICommandSender arg0) { + return new BlockSlayerCommand().getCommandUsage(arg0); + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { + if (args.length == 1) { + return getListOfStringsMatchingLastWord(args, "zombie", "spider", "wolf", "enderman", "blaze"); + } else if (args.length == 2) { + return getListOfStringsMatchingLastWord(args, "1", "2", "3", "4", "5"); + } + return null; + } + + @Override + public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { + final EntityPlayer player = (EntityPlayer)arg0; + + if (arg1.length == 0 || (arg1.length == 1 && !arg1[0].equalsIgnoreCase("off"))) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + return; + } + + switch (arg1[0].toLowerCase()) { + case "zombie": + BlockWrongSlayer.onlySlayerName = "Revenant Horror"; + break; + case "spider": + BlockWrongSlayer.onlySlayerName = "Tarantula Broodfather"; + break; + case "wolf": + BlockWrongSlayer.onlySlayerName = "Sven Packmaster"; + break; + case "enderman": + BlockWrongSlayer.onlySlayerName = "Voidgloom Seraph"; + break; + case "blaze": + BlockWrongSlayer.onlySlayerName = "Inferno Demonlord"; + break; + case "off": + BlockWrongSlayer.onlySlayerName = ""; + BlockWrongSlayer.onlySlayerNumber = ""; + ConfigHandler.writeStringConfig("toggles", "BlockSlayer", ""); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Slayer blocking turned off.")); + return; + default: + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + return; + } + + int slayerNumber = Integer.parseInt(arg1[1]); + // Just manually set to roman numeral, I don't wanna put a whole converter in here + switch (slayerNumber) { + case 1: + BlockWrongSlayer.onlySlayerNumber = "I"; + break; + case 2: + BlockWrongSlayer.onlySlayerNumber = "II"; + break; + case 3: + BlockWrongSlayer.onlySlayerNumber = "III"; + break; + case 4: + BlockWrongSlayer.onlySlayerNumber = "IV"; + break; + case 5: + BlockWrongSlayer.onlySlayerNumber = "V"; + break; + default: + BlockWrongSlayer.onlySlayerName = ""; + BlockWrongSlayer.onlySlayerNumber = ""; + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + return; + } + + ConfigHandler.writeStringConfig("toggles", "BlockSlayer", BlockWrongSlayer.onlySlayerName + " " + BlockWrongSlayer.onlySlayerNumber); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Slayer blocking set to " + DankersSkyblockMod.SECONDARY_COLOUR + BlockWrongSlayer.onlySlayerName + " " + BlockWrongSlayer.onlySlayerNumber)); + } + +} diff --git a/src/main/java/me/Danker/commands/CrystalHollowWaypointCommand.java b/src/main/java/me/Danker/commands/CrystalHollowWaypointCommand.java new file mode 100644 index 0000000..f5dea9b --- /dev/null +++ b/src/main/java/me/Danker/commands/CrystalHollowWaypointCommand.java @@ -0,0 +1,64 @@ +package me.Danker.commands; + +import me.Danker.DankersSkyblockMod; +import me.Danker.features.CrystalHollowWaypoints; +import net.minecraft.client.Minecraft; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; +import net.minecraft.util.ChatComponentText; + +public class CrystalHollowWaypointCommand extends CommandBase { + + @Override + public String getCommandName() { + return "dsmaddcrystalhollowwaypoints"; + } + + @Override + public String getCommandUsage(ICommandSender arg0) { + return "/" + getCommandName() + " <formatted waypoint>"; + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { + if (arg1.length == 0) return; + addWaypoints(String.join(" ", arg1), false); + } + + public static void addWaypoints(String list, boolean auto) { + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + String[] waypoints = list.split("\\\\n"); + + for (String waypoint : waypoints) { + String[] parts = waypoint.split("@-"); + String[] coords = parts[1].split(","); + + String location = parts[0]; + BlockPos pos = new BlockPos(Integer.parseInt(coords[0]), Integer.parseInt(coords[1]), Integer.parseInt(coords[2])); + CrystalHollowWaypoints.Waypoint newWaypoint = new CrystalHollowWaypoints.Waypoint(location, pos); + + if (auto) { + boolean contains = false; + for (CrystalHollowWaypoints.Waypoint existing : CrystalHollowWaypoints.waypoints) { + if (existing.location.equals(location)) { + contains = true; + break; + } + } + if (contains) continue; + } + + CrystalHollowWaypoints.waypoints.add(newWaypoint); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Added " + newWaypoint.location + " @ " + newWaypoint.getPos())); + } + } + +} diff --git a/src/main/java/me/Danker/commands/CustomMusicCommand.java b/src/main/java/me/Danker/commands/CustomMusicCommand.java index 0e80dd3..f0634fc 100644 --- a/src/main/java/me/Danker/commands/CustomMusicCommand.java +++ b/src/main/java/me/Danker/commands/CustomMusicCommand.java @@ -10,9 +10,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; -import javax.sound.sampled.LineUnavailableException; -import javax.sound.sampled.UnsupportedAudioFileException; -import java.io.IOException; import java.util.List; public class CustomMusicCommand extends CommandBase { @@ -24,7 +21,8 @@ public class CustomMusicCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <stop/reload/volume> [dungeonboss/bloodroom/dungeon] [1-100]"; + return "/" + getCommandName() + " <stop/reload/volume> [dungeonboss/bloodroom/dungeon/hub/island/dungeonhub/farmingislands/" + + "goldmine/deepcaverns/dwarvenmines/crystalhollows/spidersden/crimsonisle/end/park] [1-100]"; } public static String usage(ICommandSender arg0) { @@ -41,7 +39,8 @@ public class CustomMusicCommand extends CommandBase { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "stop", "reload", "volume"); } else if (args.length == 2) { - return getListOfStringsMatchingLastWord(args, "dungeonboss", "bloodroom", "dungeon"); + return getListOfStringsMatchingLastWord(args, "dungeonboss", "bloodroom", "dungeon", "hub", "island", "dungeonhub", "farmingislands", "goldmine", + "deepcaverns", "dwarvenmines", "crystalhollows", "spidersden", "crimsonisle", "end", "park"); } return null; } @@ -61,13 +60,8 @@ public class CustomMusicCommand extends CommandBase { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Stopped custom music.")); break; case "reload": - try { - CustomMusic.init(DankersSkyblockMod.configDirectory); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Reloaded custom music.")); - } catch (IOException | LineUnavailableException | UnsupportedAudioFileException e) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "An error occurred while trying to reload music.")); - e.printStackTrace(); - } + CustomMusic.init(DankersSkyblockMod.configDirectory); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Reloaded custom music.")); break; case "volume": if (arg1.length < 3) { @@ -76,36 +70,98 @@ public class CustomMusicCommand extends CommandBase { } int volume = Integer.parseInt(arg1[2]); - boolean success; switch (arg1[1].toLowerCase()) { case "dungeonboss": - success = CustomMusic.dungeonboss.setVolume(volume); - if (!success) { - return; - } + if (!CustomMusic.dungeonboss.setVolume(volume)) return; CustomMusic.dungeonbossVolume = volume; ConfigHandler.writeIntConfig("music", "DungeonBossVolume", volume); break; case "bloodroom": - success = CustomMusic.bloodroom.setVolume(volume); - if (!success) { - return; - } + if (!CustomMusic.bloodroom.setVolume(volume)) return; CustomMusic.bloodroomVolume = volume; ConfigHandler.writeIntConfig("music", "BloodRoomVolume", volume); break; case "dungeon": - success = CustomMusic.dungeon.setVolume(volume); - if (!success) { - return; - } + if (!CustomMusic.dungeon.setVolume(volume)) return; CustomMusic.dungeonVolume = volume; ConfigHandler.writeIntConfig("music", "DungeonVolume", volume); break; + case "hub": + if (!CustomMusic.hub.setVolume(volume)) return; + + CustomMusic.hubVolume = volume; + ConfigHandler.writeIntConfig("music", "HubVolume", volume); + break; + case "island": + if (!CustomMusic.island.setVolume(volume)) return; + + CustomMusic.islandVolume = volume; + ConfigHandler.writeIntConfig("music", "IslandVolume", volume); + break; + case "dungeonhub": + if (!CustomMusic.dungeonHub.setVolume(volume)) return; + + CustomMusic.dungeonHubVolume = volume; + ConfigHandler.writeIntConfig("music", "DungeonHubVolume", volume); + break; + case "farmingislands": + if (!CustomMusic.farmingIslands.setVolume(volume)) return; + + CustomMusic.farmingIslandsVolume = volume; + ConfigHandler.writeIntConfig("music", "FarmingIslandsVolume", volume); + break; + case "goldmine": + if (!CustomMusic.goldMine.setVolume(volume)) return; + + CustomMusic.goldMineVolume = volume; + ConfigHandler.writeIntConfig("music", "GoldMineVolume", volume); + break; + case "deepcaverns": + if (!CustomMusic.deepCaverns.setVolume(volume)) return; + + CustomMusic.deepCavernsVolume = volume; + ConfigHandler.writeIntConfig("music", "DeepCavernsVolume", volume); + break; + case "dwarvenmines": + if (!CustomMusic.dwarvenMines.setVolume(volume)) return; + + CustomMusic.dwarvenMinesVolume = volume; + ConfigHandler.writeIntConfig("music", "DwarvenMinesVolume", volume); + break; + case "crystalhollows": + if (!CustomMusic.crystalHollows.setVolume(volume)) return; + + CustomMusic.crystalHollowsVolume = volume; + ConfigHandler.writeIntConfig("music", "CrystalHollowsVolume", volume); + break; + case "spidersden": + if (!CustomMusic.spidersDen.setVolume(volume)) return; + + CustomMusic.spidersDenVolume = volume; + ConfigHandler.writeIntConfig("music", "SpidersDenVolume", volume); + break; + case "crimsonisle": + if (!CustomMusic.crimsonIsle.setVolume(volume)) return; + + CustomMusic.crimsonIsleVolume = volume; + ConfigHandler.writeIntConfig("music", "CrimsonIsleVolume", volume); + break; + case "end": + if (!CustomMusic.end.setVolume(volume)) return; + + CustomMusic.endVolume = volume; + ConfigHandler.writeIntConfig("music", "EndVolume", volume); + break; + case "park": + if (!CustomMusic.park.setVolume(volume)) return; + + CustomMusic.parkVolume = volume; + ConfigHandler.writeIntConfig("music", "ParkVolume", volume); + break; default: player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index efbf52d..db474c7 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -50,9 +50,11 @@ public class DHelpCommand extends CommandBase { EnumChatFormatting.GOLD + PetsCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Uses API to get pets of a person. If no name is provided, it checks yours.\n" + EnumChatFormatting.GOLD + BankCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Uses API to get bank and purse coins of a person. If no name is provided, it checks yours.\n" + EnumChatFormatting.GOLD + ArmourCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Uses API to get armour of a person. If no name is provided, it checks yours.\n" + - EnumChatFormatting.GOLD + DungeonHub.usage(arg0) + EnumChatFormatting.AQUA + " - Uses API to get dungeon levels of a person. If no name is provided, it checks yours.\n" + + EnumChatFormatting.GOLD + DungeonsCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Uses API to get dungeon levels of a person. If no name is provided, it checks yours.\n" + + EnumChatFormatting.GOLD + WeightCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Uses API to get weight of a person. If no name is provided, it checks yours. Adding lily uses lily's weight instead of Senither's.\n" + EnumChatFormatting.GOLD + ImportFishingCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Imports your fishing stats from your latest profile to your fishing tracker using the API.\n" + EnumChatFormatting.GOLD + SkyblockPlayersCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Uses API to find how many players are on each Skyblock island.\n" + + EnumChatFormatting.GOLD + BlockSlayerCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Stops you from starting a slayer quest other than the one specified.\n" + EnumChatFormatting.GOLD + SkillTrackerCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Text display for skill xp/hour.\n" + EnumChatFormatting.GOLD + LobbyBankCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Uses API to find the average bank total of the lobby, as well the three players with the highest total money in the bank(and purse).\n" + EnumChatFormatting.GOLD + RepartyCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Disbands and reparties all members in the party.\n" + @@ -65,6 +67,10 @@ public class DHelpCommand extends CommandBase { EnumChatFormatting.GOLD + HowlingCave.usage(arg0) + EnumChatFormatting.AQUA + " - Warps you to the Howling Cave in the Park. \n" + EnumChatFormatting.GOLD + Magma.usage(arg0) + EnumChatFormatting.AQUA + " - Warps you to the Magma Fields in the Blazing Fortress. \n" + EnumChatFormatting.GOLD + SpidersNest.usage(arg0) + EnumChatFormatting.AQUA + " - Warps you to the Top of the Spider's Nest in the Spider's Den. \n" + + EnumChatFormatting.GOLD + ReloadConfigCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Reloads Danker's Skyblock Mod config.\n" + + EnumChatFormatting.GOLD + ReloadRepoCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Reloads Danker's Skyblock Mod repository.\n" + + EnumChatFormatting.GOLD + FarmLengthCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Sets coords to be used for end of farm alert.\n" + + EnumChatFormatting.GOLD + HOTMCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Uses API to find total powder and HotM tree of a person. If no name is provided, it checks yours.\n" + EnumChatFormatting.GREEN + " Open Maddox Menu" + EnumChatFormatting.AQUA + " - M by default.\n" + EnumChatFormatting.GREEN + " Start/Stop Skill Tracker" + EnumChatFormatting.AQUA + " - Numpad 5 by default.\n")); } diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 6f548fa..14041d1 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -1,6 +1,7 @@ package me.Danker.commands; import me.Danker.DankersSkyblockMod; +import me.Danker.features.EndOfFarmAlert; import me.Danker.features.SkillTracker; import me.Danker.features.loot.LootDisplay; import net.minecraft.client.Minecraft; @@ -13,6 +14,8 @@ import net.minecraft.util.StringUtils; import java.awt.*; import java.awt.datatransfer.StringSelection; +import java.util.Collections; +import java.util.List; public class DankerGuiCommand extends CommandBase { @@ -22,6 +25,11 @@ public class DankerGuiCommand extends CommandBase { } @Override + public List<String> getCommandAliases() { + return Collections.singletonList("dankersskyblockmod"); + } + + @Override public String getCommandUsage(ICommandSender arg0) { return "/" + getCommandName(); } @@ -40,64 +48,6 @@ public class DankerGuiCommand extends CommandBase { if (arg1.length > 0 && arg1[0].equalsIgnoreCase("debug")) { StringBuilder debug = new StringBuilder(); debug.append("```md\n"); - debug.append("# Toggles\n"); - debug.append("[gparty][").append(ToggleCommand.gpartyToggled).append("]\n"); - debug.append("[coords][").append(ToggleCommand.coordsToggled).append("]\n"); - debug.append("[golden][").append(ToggleCommand.goldenToggled).append("]\n"); - debug.append("[slayercount][").append(ToggleCommand.slayerCountTotal).append("]\n"); - debug.append("[rngesusalerts][").append(ToggleCommand.rngesusAlerts).append("]\n"); - debug.append("[splitfishing][").append(ToggleCommand.splitFishing).append("]\n"); - debug.append("[chatmaddox][").append(ToggleCommand.chatMaddoxToggled).append("]\n"); - debug.append("[spiritbearalerts][").append(ToggleCommand.spiritBearAlerts).append("]\n"); - debug.append("[sceptremessages][").append(ToggleCommand.sceptreMessages).append("]\n"); - debug.append("[petcolors][").append(ToggleCommand.petColoursToggled).append("]\n"); - debug.append("[dungeontimer][").append(ToggleCommand.dungeonTimerToggled).append("]\n"); - debug.append("[golemalerts][").append(ToggleCommand.golemAlertToggled).append("]\n"); - debug.append("[expertiselore][").append(ToggleCommand.expertiseLoreToggled).append("]\n"); - debug.append("[skill50display][").append(ToggleCommand.skill50DisplayToggled).append("]\n"); - debug.append("[outlinetext][").append(ToggleCommand.outlineTextToggled).append("]\n"); - debug.append("[midasstaffmessages][").append(ToggleCommand.midasStaffMessages).append("]\n"); - debug.append("[implosionmessages][").append(ToggleCommand.implosionMessages).append("]\n"); - debug.append("[healmessages][").append(ToggleCommand.healMessages).append("]\n"); - debug.append("[cooldownmessages][").append(ToggleCommand.cooldownMessages).append("]\n"); - debug.append("[manamessages][").append(ToggleCommand.manaMessages).append("]\n"); - debug.append("[killcombomessages][").append(ToggleCommand.killComboMessages).append("]\n"); - debug.append("[caketimer][").append(ToggleCommand.cakeTimerToggled).append("]\n"); - debug.append("[lowhealthnotify][").append(ToggleCommand.lowHealthNotifyToggled).append("]\n"); - debug.append("[lividsolver][").append(ToggleCommand.lividSolverToggled).append("]\n"); - debug.append("[stopsalvagestarred][").append(ToggleCommand.stopSalvageStarredToggled).append("]\n"); - debug.append("[notifyslayerslain][").append(ToggleCommand.notifySlayerSlainToggled).append("]\n"); - debug.append("[necronnotifications][").append(ToggleCommand.necronNotificationsToggled).append("]\n"); - debug.append("[bonzotimer][").append(ToggleCommand.bonzoTimerToggled).append("]\n"); - debug.append("[autoskilltracker][").append(ToggleCommand.autoSkillTrackerToggled).append("]\n"); - debug.append("[threemanpuzzle][").append(ToggleCommand.threeManToggled).append("]\n"); - debug.append("[oruopuzzle][").append(ToggleCommand.oruoToggled).append("]\n"); - debug.append("[blazepuzzle][").append(ToggleCommand.blazeToggled).append("]\n"); - debug.append("[creeperpuzzle][").append(ToggleCommand.creeperToggled).append("]\n"); - debug.append("[waterpuzzle][").append(ToggleCommand.waterToggled).append("]\n"); - debug.append("[tictactoepuzzle][").append(ToggleCommand.ticTacToeToggled).append("]\n"); - debug.append("[boulderpuzzle][").append(ToggleCommand.boulderToggled).append("]\n"); - debug.append("[silverfishpuzzle][").append(ToggleCommand.silverfishToggled).append("]\n"); - debug.append("[icewalkpuzzle][").append(ToggleCommand.iceWalkToggled).append("]\n"); - debug.append("[watchermessage][").append(ToggleCommand.watcherReadyToggled).append("]\n"); - debug.append("[startswithterminal][").append(ToggleCommand.startsWithToggled).append("]\n"); - debug.append("[selectallterminal][").append(ToggleCommand.selectAllToggled).append("]\n"); - debug.append("[clickinorderterminal][").append(ToggleCommand.clickInOrderToggled).append("]\n"); - debug.append("[ultrasequencer][").append(ToggleCommand.ultrasequencerToggled).append("]\n"); - debug.append("[chronomatron][").append(ToggleCommand.chronomatronToggled).append("]\n"); - debug.append("[superpairs][").append(ToggleCommand.superpairsToggled).append("]\n"); - debug.append("[hidetooltipsinaddons][").append(ToggleCommand.hideTooltipsInExperimentAddonsToggled).append("]\n"); - debug.append("[pickblock][").append(ToggleCommand.swapToPickBlockToggled).append("]\n"); - debug.append("[melodytooltips][").append(ToggleCommand.melodyTooltips).append("]\n"); - debug.append("[highlightslayers][").append(ToggleCommand.highlightSlayers).append("]\n"); - debug.append("[highlightarachne][").append(ToggleCommand.highlightArachne).append("]\n"); - debug.append("[highlightskeletonmasters][").append(ToggleCommand.highlightSkeletonMasters).append("]\n"); - debug.append("[teammatesinradius][").append(ToggleCommand.teammatesInRadius).append("]\n"); - debug.append("[gianthp][").append(ToggleCommand.giantHP).append("]\n"); - debug.append("[hidepetcandy][").append(ToggleCommand.hidePetCandy).append("]\n"); - debug.append("[dungeonbossmusic][").append(ToggleCommand.dungeonBossMusic).append("]\n"); - debug.append("[bloodroommusic][").append(ToggleCommand.bloodRoomMusic).append("]\n"); - debug.append("[dungeonmusic][").append(ToggleCommand.dungeonMusic).append("]\n"); debug.append("# Locations\n"); debug.append("[coords][").append(MoveCommand.coordsXY[0]).append(", ").append(MoveCommand.coordsXY[1]).append("]\n"); debug.append("[display][").append(MoveCommand.displayXY[0]).append(", ").append(MoveCommand.displayXY[1]).append("]\n"); @@ -107,10 +57,17 @@ public class DankerGuiCommand extends CommandBase { debug.append("[caketimer][").append(MoveCommand.cakeTimerXY[0]).append(", ").append(MoveCommand.cakeTimerXY[1]).append("]\n"); debug.append("[skilltracker][").append(MoveCommand.skillTrackerXY[0]).append(", ").append(MoveCommand.skillTrackerXY[1]).append("]\n"); debug.append("[wateranswer][").append(MoveCommand.waterAnswerXY[0]).append(", ").append(MoveCommand.waterAnswerXY[1]).append("]\n"); + debug.append("[bonzotimer][").append(MoveCommand.bonzoTimerXY[0]).append(", ").append(MoveCommand.bonzoTimerXY[1]).append("]\n"); + debug.append("[golemtimer][").append(MoveCommand.golemTimerXY[0]).append(", ").append(MoveCommand.golemTimerXY[1]).append("]\n"); + debug.append("[teammatesinradius][").append(MoveCommand.teammatesInRadiusXY[0]).append(", ").append(MoveCommand.teammatesInRadiusXY[1]).append("]\n"); + debug.append("[gianthp][").append(MoveCommand.giantHPXY[0]).append(", ").append(MoveCommand.giantHPXY[1]).append("]\n"); + debug.append("[abilitycooldowns][").append(MoveCommand.abilityCooldownsXY[0]).append(", ").append(MoveCommand.abilityCooldownsXY[1]).append("]\n"); + debug.append("[dungeonscore][").append(MoveCommand.dungeonScoreXY[0]).append(", ").append(MoveCommand.dungeonScoreXY[1]).append("]\n"); debug.append("# Other Settings\n"); debug.append("[Current Display][").append(LootDisplay.display).append("]\n"); debug.append("[Auto Display][").append(LootDisplay.auto).append("]\n"); debug.append("[Skill Tracker Visible][").append(SkillTracker.showSkillTracker).append("]\n"); + debug.append("[Farm Length][").append(EndOfFarmAlert.min).append(" to ").append(EndOfFarmAlert.max).append("]\n"); debug.append("# Problematic Mods\n"); debug.append("[LabyMod][").append(DankersSkyblockMod.usingLabymod).append("]\n"); debug.append("[OAM][").append(DankersSkyblockMod.usingOAM).append("]\n"); diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java index 990e9d1..21ada93 100644 --- a/src/main/java/me/Danker/commands/DisplayCommand.java +++ b/src/main/java/me/Danker/commands/DisplayCommand.java @@ -21,7 +21,7 @@ public class DisplayCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/mythological/ghost/auto/off> [winter/festival/spooky/session/f(1-7)]"; + return "/" + getCommandName() + " <zombie/spider/wolf/enderman/blaze/fishing/catacombs/mythological/ghost/auto/off> [winter/festival/spooky/ch/lava/session/f(1-7)/mm]"; } public static String usage(ICommandSender arg0) { @@ -36,11 +36,11 @@ public class DisplayCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "mythological", "ghost", "auto", "off"); + return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "enderman", "blaze", "fishing", "catacombs", "mythological", "ghost", "auto", "off"); } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { - return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); + return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "ch", "lava", "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"); + return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6", "f7", "floor7", "mm", "master"); } else if (args.length > 1) { return getListOfStringsMatchingLastWord(args, "session"); } @@ -56,10 +56,8 @@ public class DisplayCommand extends CommandBase { return; } - boolean showSession = false; - - if (arg1[arg1.length - 1].equalsIgnoreCase("session")) showSession = true; - + boolean showSession = arg1[arg1.length - 1].equalsIgnoreCase("session"); + switch (arg1[0].toLowerCase()) { case "wolf": if (showSession) { @@ -82,6 +80,20 @@ public class DisplayCommand extends CommandBase { LootDisplay.display = "zombie"; } break; + case "enderman": + if (showSession) { + LootDisplay.display = "enderman_session"; + } else { + LootDisplay.display = "enderman"; + } + break; + case "blaze": + if (showSession) { + LootDisplay.display = "blaze_session"; + } else { + LootDisplay.display = "blaze"; + } + break; case "fishing": if (arg1.length > 1) { switch (arg1[1].toLowerCase()) { @@ -106,6 +118,20 @@ public class DisplayCommand extends CommandBase { LootDisplay.display = "fishing_spooky"; } break; + case "ch": + if (showSession) { + LootDisplay.display = "fishing_ch_session"; + } else { + LootDisplay.display = "fishing_ch"; + } + break; + case "lava": + if (showSession) { + LootDisplay.display = "fishing_lava_session"; + } else { + LootDisplay.display = "fishing_lava"; + } + break; default: if (showSession) { LootDisplay.display = "fishing_session"; @@ -191,8 +217,15 @@ public class DisplayCommand extends CommandBase { LootDisplay.display = "catacombs_floor_seven"; } break; + case "mm": + case "master": + if (showSession) { + LootDisplay.display = "catacombs_master_session"; + } else { + LootDisplay.display = "catacombs_master"; + } default: - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.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/mm>")); return; } break; @@ -202,7 +235,7 @@ public class DisplayCommand extends CommandBase { } else { LootDisplay.display = "ghost"; } - + break; case "auto": LootDisplay.auto = true; player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display set to " + DankersSkyblockMod.SECONDARY_COLOUR + "auto" + DankersSkyblockMod.MAIN_COLOUR + ".")); diff --git a/src/main/java/me/Danker/commands/DungeonsCommand.java b/src/main/java/me/Danker/commands/DungeonsCommand.java index 9924a9d..75f6f46 100644 --- a/src/main/java/me/Danker/commands/DungeonsCommand.java +++ b/src/main/java/me/Danker/commands/DungeonsCommand.java @@ -13,140 +13,170 @@ import net.minecraft.event.HoverEvent; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; +import java.text.NumberFormat; import java.util.List; +import java.util.Locale; public class DungeonsCommand extends CommandBase { - @Override - public String getCommandName() { - return "dungeons"; - } - - @Override - public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " [name]"; - } - - public static String usage(ICommandSender arg0) { - return new DungeonsCommand().getCommandUsage(arg0); - } - - @Override - public int getRequiredPermissionLevel() { - return 0; - } - - @Override - public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { - if (args.length == 1) { - return Utils.getMatchingPlayers(args[0]); - } - return null; - } - - @Override - public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { - // MULTI THREAD DRIFTING - new Thread(() -> { - EntityPlayer player = (EntityPlayer) arg0; - - // Check key - String key = ConfigHandler.getString("api", "APIKey"); - if (key.equals("")) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); - } - - // Get UUID for Hypixel API requests - String username; - String uuid; - if (arg1.length == 0) { - username = player.getName(); - uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking dungeon stats of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); - } else { - username = arg1[0]; - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking dungeon stats of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); - uuid = APIHandler.getUUID(username); - } - - // Find stats of latest profile - String latestProfile = APIHandler.getLatestProfileID(uuid, key); - if (latestProfile == null) return; - - String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; - System.out.println("Fetching profile..."); - JsonObject profileResponse = APIHandler.getResponse(profileURL); - if (!profileResponse.get("success").getAsBoolean()) { - String reason = profileResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); - return; - } - - String playerURL = "https://api.hypixel.net/player?uuid=" + uuid + "&key=" + key; - System.out.println("Fetching player data..."); - JsonObject playerResponse = APIHandler.getResponse(playerURL); - if(!playerResponse.get("success").getAsBoolean()){ - String reason = playerResponse.get("cause").getAsString(); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "This player has not played on Hypixel.")); - } - - 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(DankersSkyblockMod.ERROR_COLOUR + "This player has not played dungeons.")); - return; - } - - JsonObject catacombsObject = dungeonsObject.get("dungeon_types").getAsJsonObject().get("catacombs").getAsJsonObject(); - double catacombs = Utils.xpToDungeonsLevel(catacombsObject.get("experience").getAsDouble()); - double healer = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("healer").getAsJsonObject().get("experience").getAsDouble()); - double mage = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("mage").getAsJsonObject().get("experience").getAsDouble()); - double berserk = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("berserk").getAsJsonObject().get("experience").getAsDouble()); - double archer = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("archer").getAsJsonObject().get("experience").getAsDouble()); - 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()); - int secrets = playerResponse.get("player").getAsJsonObject().get("achievements").getAsJsonObject().get("skyblock_treasure_hunter").getAsInt(); - - int highestFloor = catacombsObject.get("highest_tier_completed").getAsInt(); - JsonObject completionObj = catacombsObject.get("tier_completions").getAsJsonObject(); - - String delimiter = DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------"; - - ChatComponentText classLevels = new ChatComponentText( - EnumChatFormatting.GOLD + " Selected Class: " + selectedClass + "\n\n" + - EnumChatFormatting.RED + " Catacombs Level: " + catacombs + "\n" + - EnumChatFormatting.YELLOW + " Healer Level: " + healer + "\n" + - EnumChatFormatting.LIGHT_PURPLE + " Mage Level: " + mage + "\n" + - EnumChatFormatting.RED + " Berserk Level: " + berserk + "\n" + - EnumChatFormatting.GREEN + " Archer Level: " + archer + "\n" + - EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n\n" + - EnumChatFormatting.WHITE + " Secrets Found: " + secrets + "\n\n"); - - StringBuilder completionsHoverString = new StringBuilder(); - - for (int i = 0; i <= highestFloor; i++) { - completionsHoverString - .append(EnumChatFormatting.GOLD) - .append(i == 0 ? "Entrance: " : "Floor " + i + ": ") - .append(EnumChatFormatting.RESET) - .append(completionObj.get(String.valueOf(i)).getAsInt()) - .append(i < highestFloor ? "\n": ""); - } - - ChatComponentText completions = new ChatComponentText(EnumChatFormatting.GOLD + " Highest Floor Completed: " + highestFloor); - - completions.setChatStyle(completions.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText(completionsHoverString.toString())))); - - - player.addChatMessage( - new ChatComponentText(delimiter) - .appendText("\n") - .appendSibling(classLevels) - .appendSibling(completions) - .appendText("\n") - .appendSibling(new ChatComponentText(delimiter)) - ); - }).start(); - } -}
\ No newline at end of file + @Override + public String getCommandName() { + return "dungeons"; + } + + @Override + public String getCommandUsage(ICommandSender arg0) { + return "/" + getCommandName() + " [name]"; + } + + public static String usage(ICommandSender arg0) { + return new DungeonsCommand().getCommandUsage(arg0); + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { + if (args.length == 1) { + return Utils.getMatchingPlayers(args[0]); + } + return null; + } + + @Override + public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { + // MULTI THREAD DRIFTING + new Thread(() -> { + EntityPlayer player = (EntityPlayer) arg0; + + // Check key + String key = ConfigHandler.getString("api", "APIKey"); + if (key.equals("")) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + return; + } + + // Get UUID for Hypixel API requests + String username; + String uuid; + if (arg1.length == 0) { + username = player.getName(); + uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking dungeon stats of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); + } else { + username = arg1[0]; + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking dungeon stats of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); + uuid = APIHandler.getUUID(username); + } + + // Find stats of latest profile + String latestProfile = APIHandler.getLatestProfileID(uuid, key); + if (latestProfile == null) return; + + String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; + System.out.println("Fetching profile..."); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); + if (!profileResponse.get("success").getAsBoolean()) { + String reason = profileResponse.get("cause").getAsString(); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); + return; + } + + String playerURL = "https://api.hypixel.net/player?uuid=" + uuid + "&key=" + key; + System.out.println("Fetching player data..."); + JsonObject playerResponse = APIHandler.getResponse(playerURL, true); + if (!playerResponse.get("success").getAsBoolean()) { + String reason = playerResponse.get("cause").getAsString(); + 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(DankersSkyblockMod.ERROR_COLOUR + "This player has not played dungeons.")); + return; + } + + JsonObject catacombsObject = dungeonsObject.get("dungeon_types").getAsJsonObject().get("catacombs").getAsJsonObject(); + + double catacombs = Utils.xpToDungeonsLevel(catacombsObject.get("experience").getAsDouble()); + double healer = MathHelper.clamp_double(Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("healer").getAsJsonObject().get("experience").getAsDouble()), 0D, 50D); + double mage = MathHelper.clamp_double(Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("mage").getAsJsonObject().get("experience").getAsDouble()), 0D, 50D); + double berserk = MathHelper.clamp_double(Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("berserk").getAsJsonObject().get("experience").getAsDouble()), 0D, 50D); + double archer = MathHelper.clamp_double(Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("archer").getAsJsonObject().get("experience").getAsDouble()), 0D, 50D); + double tank = MathHelper.clamp_double(Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("tank").getAsJsonObject().get("experience").getAsDouble()), 0D, 50D); + double classAverage = Math.round((healer + mage + berserk + archer + tank) / 5D * 100D) / 100D; + String selectedClass = Utils.capitalizeString(dungeonsObject.get("selected_dungeon_class").getAsString()); + int secrets = playerResponse.get("player").getAsJsonObject().get("achievements").getAsJsonObject().get("skyblock_treasure_hunter").getAsInt(); + + int highestFloor = catacombsObject.get("highest_tier_completed").getAsInt(); + JsonObject completionObj = catacombsObject.get("tier_completions").getAsJsonObject(); + + JsonObject catacombsMasterObject = dungeonsObject.get("dungeon_types").getAsJsonObject().get("master_catacombs").getAsJsonObject(); + boolean hasPlayedMaster = catacombsMasterObject.has("highest_tier_completed"); + + int highestMasterFloor = 0; + JsonObject completionMasterObj = null; + if (hasPlayedMaster) { + highestMasterFloor = catacombsMasterObject.get("highest_tier_completed").getAsInt(); + completionMasterObj = catacombsMasterObject.get("tier_completions").getAsJsonObject(); + } + + String delimiter = DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------"; + + ChatComponentText classLevels = new ChatComponentText(EnumChatFormatting.GOLD + " Selected Class: " + selectedClass + "\n\n" + + EnumChatFormatting.RED + " Catacombs Level: " + catacombs + "\n" + + EnumChatFormatting.RED + " Class Average: " + classAverage + "\n\n" + + EnumChatFormatting.YELLOW + " Healer Level: " + healer + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Mage Level: " + mage + "\n" + + EnumChatFormatting.RED + " Berserk Level: " + berserk + "\n" + + EnumChatFormatting.GREEN + " Archer Level: " + archer + "\n" + + EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n\n" + + EnumChatFormatting.WHITE + " Secrets Found: " + NumberFormat.getIntegerInstance(Locale.US).format(secrets) + "\n\n"); + + StringBuilder completionsHoverString = new StringBuilder(); + for (int i = 0; i <= highestFloor; i++) { + completionsHoverString + .append(EnumChatFormatting.GOLD) + .append(i == 0 ? "Entrance: " : "Floor " + i + ": ") + .append(EnumChatFormatting.RESET) + .append(completionObj.get(String.valueOf(i)).getAsInt()) + .append(i < highestFloor || hasPlayedMaster ? "\n": ""); + } + for (int i = 1; i <= highestMasterFloor; i++) { + if (completionMasterObj != null && completionMasterObj.has(String.valueOf(i))) { + completionsHoverString + .append(EnumChatFormatting.GOLD) + .append("Master Floor ") + .append(i) + .append(": ") + .append(EnumChatFormatting.RESET) + .append(completionMasterObj.get(String.valueOf(i)).getAsInt()) + .append(i < highestMasterFloor ? "\n": ""); + } + } + + ChatComponentText completions; + if (hasPlayedMaster) { + completions = new ChatComponentText(EnumChatFormatting.GOLD + " Highest Floor Completed: Master " + highestMasterFloor); + } else { + completions = new ChatComponentText(EnumChatFormatting.GOLD + " Highest Floor Completed: " + highestFloor); + } + completions.setChatStyle(completions.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText(completionsHoverString.toString())))); + + player.addChatMessage( + new ChatComponentText(delimiter) + .appendText("\n") + .appendSibling(classLevels) + .appendSibling(completions) + .appendText("\n") + .appendSibling(new ChatComponentText(delimiter))); + }).start(); + } +} diff --git a/src/main/java/me/Danker/commands/FairySoulsCommand.java b/src/main/java/me/Danker/commands/FairySoulsCommand.java index b93d596..b0c67b2 100644 --- a/src/main/java/me/Danker/commands/FairySoulsCommand.java +++ b/src/main/java/me/Danker/commands/FairySoulsCommand.java @@ -52,6 +52,7 @@ public class FairySoulsCommand extends CommandBase { String key = ConfigHandler.getString("api", "APIKey"); if(key.equals("")) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + return; } // Get UUID for Hypixel API requests @@ -74,7 +75,7 @@ public class FairySoulsCommand extends CommandBase { String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); - JsonObject profileResponse = APIHandler.getResponse(profileURL); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); @@ -88,7 +89,7 @@ public class FairySoulsCommand extends CommandBase { int fairy_souls = userObject.get("fairy_souls_collected").getAsInt(); System.out.println(fairy_souls); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "The player " + username + " has " + DankersSkyblockMod.VALUE_COLOUR + fairy_souls + DankersSkyblockMod.MAIN_COLOUR + "/222" + " collected")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "The player " + username + " has " + DankersSkyblockMod.VALUE_COLOUR + fairy_souls + DankersSkyblockMod.MAIN_COLOUR + "/227" + " collected")); }).start(); diff --git a/src/main/java/me/Danker/commands/FarmLengthCommand.java b/src/main/java/me/Danker/commands/FarmLengthCommand.java new file mode 100644 index 0000000..c9c8e11 --- /dev/null +++ b/src/main/java/me/Danker/commands/FarmLengthCommand.java @@ -0,0 +1,52 @@ +package me.Danker.commands; + +import me.Danker.DankersSkyblockMod; +import me.Danker.features.EndOfFarmAlert; +import me.Danker.handlers.ConfigHandler; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ChatComponentText; + +public class FarmLengthCommand extends CommandBase { + + @Override + public String getCommandName() { + return "dsmfarmlength"; + } + + @Override + public String getCommandUsage(ICommandSender arg0) { + return "/" + getCommandName() + " <min coords> <max coords>"; + } + + public static String usage(ICommandSender arg0) { + return new FarmLengthCommand().getCommandUsage(arg0); + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { + EntityPlayer player = (EntityPlayer) arg0; + + if (arg1.length == 0) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Current Range: " + DankersSkyblockMod.SECONDARY_COLOUR + EndOfFarmAlert.min + DankersSkyblockMod.MAIN_COLOUR + " to " + DankersSkyblockMod.SECONDARY_COLOUR + EndOfFarmAlert.max)); + return; + } else if (arg1.length < 2) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + return; + } + + EndOfFarmAlert.min = Double.parseDouble(arg1[0]); + EndOfFarmAlert.max = Double.parseDouble(arg1[1]); + ConfigHandler.writeDoubleConfig("misc", "farmMin", EndOfFarmAlert.min); + ConfigHandler.writeDoubleConfig("misc", "farmMax", EndOfFarmAlert.max); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Farm length set to " + DankersSkyblockMod.SECONDARY_COLOUR + EndOfFarmAlert.min + DankersSkyblockMod.MAIN_COLOUR + " to " + DankersSkyblockMod.SECONDARY_COLOUR + EndOfFarmAlert.max)); + } + +} diff --git a/src/main/java/me/Danker/commands/GuildOfCommand.java b/src/main/java/me/Danker/commands/GuildOfCommand.java index 1c9f1c4..a97196e 100644 --- a/src/main/java/me/Danker/commands/GuildOfCommand.java +++ b/src/main/java/me/Danker/commands/GuildOfCommand.java @@ -56,6 +56,7 @@ public class GuildOfCommand extends CommandBase { String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + return; } // Get UUID for Hypixel API requests @@ -74,7 +75,7 @@ public class GuildOfCommand extends CommandBase { // Find guild ID System.out.println("Fetching guild..."); String guildURL = "https://api.hypixel.net/guild?player=" + uuid + "&key=" + key; - JsonObject guildResponse = APIHandler.getResponse(guildURL); + JsonObject guildResponse = APIHandler.getResponse(guildURL, true); if (!guildResponse.get("success").getAsBoolean()) { String reason = guildResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); diff --git a/src/main/java/me/Danker/commands/HOTMCommand.java b/src/main/java/me/Danker/commands/HOTMCommand.java new file mode 100644 index 0000000..7a8adb5 --- /dev/null +++ b/src/main/java/me/Danker/commands/HOTMCommand.java @@ -0,0 +1,136 @@ +package me.Danker.commands; + +import com.google.gson.JsonObject; +import me.Danker.DankersSkyblockMod; +import me.Danker.handlers.APIHandler; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.event.ClickEvent; +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 HOTMCommand extends CommandBase { + + @Override + public String getCommandName() { + return "hotmof"; + } + + @Override + public String getCommandUsage(ICommandSender arg0) { + return "/" + getCommandName() + " [name]"; + } + + public static String usage(ICommandSender arg0) { + return new HOTMCommand().getCommandUsage(arg0); + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { + if (args.length == 1) { + return Utils.getMatchingPlayers(args[0]); + } + return null; + } + + @Override + public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { + // MULTI THREAD DRIFTING + new Thread(() -> { + EntityPlayer player = (EntityPlayer) arg0; + + // Check key + String key = ConfigHandler.getString("api", "APIKey"); + if (key.equals("")) { + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey.")); + return; + } + + // Get UUID for Hypixel API requests + String username; + String uuid; + if (arg1.length == 0) { + username = player.getName(); + uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking HotM of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); + } else { + username = arg1[0]; + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking HotM of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); + uuid = APIHandler.getUUID(username); + } + + // Find stats of latest profile + String latestProfile = APIHandler.getLatestProfileID(uuid, key); + if (latestProfile == null) return; + + String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; + System.out.println("Fetching profile..."); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); + if (!profileResponse.get("success").getAsBoolean()) { + String reason = profileResponse.get("cause").getAsString(); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason)); + return; + } + + System.out.println("Fetching mining stats..."); + JsonObject miningCore = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject().get("mining_core").getAsJsonObject(); + + int mithril = 0; + if (miningCore.has("powder_mithril")) { + mithril = miningCore.get("powder_mithril").getAsInt(); + if (miningCore.has("powder_spent_mithril")) mithril += miningCore.get("powder_spent_mithril").getAsInt(); + } + + int gemstone = 0; + if (miningCore.has("powder_gemstone")) { + gemstone = miningCore.get("powder_gemstone").getAsInt(); + if (miningCore.has("powder_spent_gemstone")) gemstone += miningCore.get("powder_spent_gemstone").getAsInt(); + } + + String ability = EnumChatFormatting.RED + "None"; + if (miningCore.has("selected_pickaxe_ability")) { + ability = Node.valueOf(miningCore.get("selected_pickaxe_ability").getAsString()).name; + } + + ChatComponentText tree = new ChatComponentText(EnumChatFormatting.GREEN + "" + EnumChatFormatting.BOLD + "[CLICK]"); + tree.setChatStyle(tree.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/hotmtree " + username + " " + latestProfile))); + + NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.AQUA + username + "'s HotM:\n" + + DankersSkyblockMod.TYPE_COLOUR + "Mithril Powder: " + EnumChatFormatting.DARK_GREEN + nf.format(mithril) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + "Gemstone Powder: " + EnumChatFormatting.LIGHT_PURPLE + nf.format(gemstone) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + "Pickaxe Ability: " + DankersSkyblockMod.VALUE_COLOUR + ability + "\n" + + DankersSkyblockMod.TYPE_COLOUR + "HotM Tree: ").appendSibling(tree) + .appendSibling(new ChatComponentText("\n" + DankersSkyblockMod.DELIMITER_COLOUR + EnumChatFormatting.BOLD + "-------------------"))); + }).start(); + } + + enum Node { + mining_speed_boost("Mining Speed Boost"), + pickaxe_toss("Pickobulus"), + vein_seeker("Vein Seeker"), + maniac_miner("Maniac Miner"); + + public String name; + + Node(String name) { + this.name = name; + } + } + +} diff --git a/src/main/java/me/Danker/commands/HOTMTreeCommand.java b/src/main/java/me/Danker/commands/HOTMTreeCommand.java new file mode 100644 index 0000000..90b82d3 --- /dev/null +++ b/src/main/java/me/Danker/commands/HOTMTreeCommand.java @@ -0,0 +1,151 @@ +package me.Danker.commands; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import me.Danker.DankersSkyblockMod; +import me.Danker.containers.GuiChestDynamic; +import me.Danker.handlers.APIHandler; +import me.Danker.utils.Utils; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryBasic; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.*; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.util.Constants; + +import java.util.ArrayList; +import java.util.Base64; +import java.util.List; +import java.util.UUID; + +public class HOTMTreeCommand extends CommandBase { + + public static GuiChestDynamic chest = null; + + @Override + public String getCommandName() { + return "hotmtree"; + } + + @Override + public String getCommandUsage(ICommandSender arg0) { + return null; + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { + // MULTI THREAD DRIFTING + new Thread(() -> { + EntityPlayer player = (EntityPlayer) arg0; + + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking HotM tree of " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[0])); + + System.out.println("Fetching profile..."); + String profileURL = "https://sky.shiiyu.moe/api/v2/profile/" + arg1[0]; + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); + if (profileResponse.has("error")) { + String reason = profileResponse.get("error").getAsString(); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason)); + return; + } + + System.out.println("Fetching HotM tree..."); + JsonArray tree = profileResponse.get("profiles").getAsJsonObject().get(arg1[1]).getAsJsonObject().get("items").getAsJsonObject().get("hotm").getAsJsonArray(); + + IInventory inventory = new InventoryBasic(arg1[0] + "'s HotM Tree:", true, 63); + + for (JsonElement e : tree) { + JsonObject node = e.getAsJsonObject(); + + if (!node.has("tag")) continue; + + ItemStack item = new ItemStack(Item.getItemById(node.get("id").getAsInt()), node.get("Count").getAsInt(), node.get("Damage").getAsInt()); + + NBTTagCompound nbt = new NBTTagCompound(); + try { + nbt = JsonToNBT.getTagFromJson(node.get("tag").toString()); + removeDoubleQuotes(nbt); + nbt.getCompoundTag("display").getTagList("Lore", Constants.NBT.TAG_STRING).removeTag(0); + } catch (NBTException ex) { + ex.printStackTrace(); + continue; + } + + if (node.get("glowing").getAsBoolean()) { + nbt.setTag("HideFlags", new NBTTagShort((short) 1)); + } + + if (node.has("texture_path")) { + String path = node.get("texture_path").getAsString(); + NBTTagCompound skullOwner = new NBTTagCompound(); + NBTTagCompound properties = new NBTTagCompound(); + NBTTagList textures = new NBTTagList(); + NBTTagCompound value = new NBTTagCompound(); + String texture = "{\"textures\":{\"SKIN\":{\"url\":\"http://textures.minecraft.net/texture/" + path.substring(path.lastIndexOf("/") + 1) + "\"}}}"; + value.setTag("Value", new NBTTagString(Base64.getEncoder().encodeToString(texture.getBytes()))); + textures.appendTag(value); + properties.setTag("textures", textures); + skullOwner.setTag("Properties", properties); + skullOwner.setTag("Id", new NBTTagString(UUID.randomUUID().toString())); + nbt.setTag("SkullOwner", skullOwner); + } + + item.setTagCompound(nbt); + + if (node.get("glowing").getAsBoolean()) { + item.addEnchantment(Enchantment.protection, 1); + } + item.setStackDisplayName(Utils.removeBold(item.getDisplayName())); + + inventory.setInventorySlotContents(node.get("position").getAsInt() - 1, item); + } + + chest = new GuiChestDynamic(player.inventory, inventory, new ResourceLocation("dsm", "textures/generic_63.png")); + DankersSkyblockMod.guiToOpen = "hotminventory"; + }).start(); + } + + // https://bitbucket.org/hrznstudio/mo-legacy-edition/src/4cc47b2a792cc2ef19eb7e5db0169706ea2e48dd/src/main/java/matteroverdrive/util/MOJsonHelper.java#lines-164:179 + public static void removeDoubleQuotes(NBTTagCompound tagCompound) { + List<String> cachedKeyList = new ArrayList<>(); + cachedKeyList.addAll(tagCompound.getKeySet()); + for (String key : cachedKeyList) { + NBTBase base = tagCompound.getTag(key); + tagCompound.removeTag(key); + + key = key.replace("\"", ""); + if (base instanceof NBTTagCompound) { + removeDoubleQuotes((NBTTagCompound) base); + } else if (base instanceof NBTTagList) { + removeDoubleQuotes((NBTTagList) base); + } + tagCompound.setTag(key, base); + } + } + + // https://bitbucket.org/hrznstudio/mo-legacy-edition/src/4cc47b2a792cc2ef19eb7e5db0169706ea2e48dd/src/main/java/matteroverdrive/util/MOJsonHelper.java#lines-181:189 + public static void removeDoubleQuotes(NBTTagList tagList) { + for (int i = 0; i < tagList.tagCount(); i++) { + if (tagList.get(i) instanceof NBTTagCompound) { + removeDoubleQuotes((NBTTagCompound) tagList.get(i)); + } else if (tagList.get(i) instanceof NBTTagList) { + removeDoubleQuotes((NBTTagList) tagList.get(i)); + } + } + } + +} diff --git a/src/main/java/me/Danker/commands/ImportFishingCommand.java b/src/main/java/me/Danker/commands/ImportFishingCommand.java index 4aeff2c..f51e01f 100644 --- a/src/main/java/me/Danker/commands/ImportFishingCommand.java +++ b/src/main/java/me/Danker/commands/ImportFishingCommand.java @@ -2,7 +2,7 @@ package me.Danker.commands; import com.google.gson.JsonObject; import me.Danker.DankersSkyblockMod; -import me.Danker.features.loot.LootTracker; +import me.Danker.features.loot.FishingTracker; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; @@ -37,260 +37,148 @@ public class ImportFishingCommand extends CommandBase { // MULTI THREAD DRIFTING new Thread(() -> { EntityPlayer player = (EntityPlayer) arg0; - + // Check key String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + return; } - + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Importing your fishing stats...")); - + // Get UUID for Hypixel API requests String uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); - + String latestProfile = APIHandler.getLatestProfileID(uuid, key); if (latestProfile == null) return; - + String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); - JsonObject profileResponse = APIHandler.getResponse(profileURL); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } - + System.out.println("Fetching fishing stats..."); JsonObject statsObject = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject().get("stats").getAsJsonObject(); - - LootTracker.greatCatches = 0; - LootTracker.goodCatches = 0; + + FishingTracker.greatCatches = 0; + FishingTracker.goodCatches = 0; if (statsObject.has("items_fished_treasure")) { if (statsObject.has("items_fished_large_treasure")) { - LootTracker.greatCatches = statsObject.get("items_fished_large_treasure").getAsInt(); - LootTracker.goodCatches = statsObject.get("items_fished_treasure").getAsInt() - LootTracker.greatCatches; - } else { - LootTracker.goodCatches = statsObject.get("items_fished_treasure").getAsInt(); - } - } - - LootTracker.seaCreatures = 0; - LootTracker.squids = 0; - if (statsObject.has("kills_pond_squid")) { - LootTracker.squids = statsObject.get("kills_pond_squid").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.squids; - - LootTracker.seaWalkers = 0; - if (statsObject.has("kills_sea_walker")) { - LootTracker.seaWalkers = statsObject.get("kills_sea_walker").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.seaWalkers; - - LootTracker.nightSquids = 0; - if (statsObject.has("kills_night_squid")) { - LootTracker.nightSquids = statsObject.get("kills_night_squid").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.nightSquids; - - LootTracker.seaGuardians = 0; - if (statsObject.has("kills_sea_guardian")) { - LootTracker.seaGuardians = statsObject.get("kills_sea_guardian").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.seaGuardians; - - LootTracker.seaWitches = 0; - if (statsObject.has("kills_sea_witch")) { - LootTracker.seaWitches = statsObject.get("kills_sea_witch").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.seaWitches; - - LootTracker.seaArchers = 0; - if (statsObject.has("kills_sea_archer")) { - LootTracker.seaArchers = statsObject.get("kills_sea_archer").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.seaArchers; - - LootTracker.monsterOfTheDeeps = 0; - if (statsObject.has("kills_zombie_deep")) { - if (statsObject.has("kills_chicken_deep")) { - LootTracker.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt() + statsObject.get("kills_chicken_deep").getAsInt(); - } else { - LootTracker.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt(); - } - } else if (statsObject.has("kills_chicken_deep")) { - LootTracker.monsterOfTheDeeps = statsObject.get("kills_chicken_deep").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.monsterOfTheDeeps; - - LootTracker.catfishes = 0; - if (statsObject.has("kills_catfish")) { - LootTracker.catfishes = statsObject.get("kills_catfish").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.catfishes; - - LootTracker.carrotKings = 0; - if (statsObject.has("kills_carrot_king")) { - LootTracker.carrotKings = statsObject.get("kills_carrot_king").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.carrotKings; - - LootTracker.seaLeeches = 0; - if (statsObject.has("kills_sea_leech")) { - LootTracker.seaLeeches = statsObject.get("kills_sea_leech").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.seaLeeches; - - LootTracker.guardianDefenders = 0; - if (statsObject.has("kills_guardian_defender")) { - LootTracker.guardianDefenders = statsObject.get("kills_guardian_defender").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.guardianDefenders; - - LootTracker.deepSeaProtectors = 0; - if (statsObject.has("kills_deep_sea_protector")) { - LootTracker.deepSeaProtectors = statsObject.get("kills_deep_sea_protector").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.deepSeaProtectors; - - LootTracker.hydras = 0; - if (statsObject.has("kills_water_hydra")) { - // Hydra splits - LootTracker.hydras = statsObject.get("kills_water_hydra").getAsInt() / 2; - } - LootTracker.seaCreatures += LootTracker.hydras; - - LootTracker.seaEmperors = 0; - if (statsObject.has("kills_skeleton_emperor")) { - if (statsObject.has("kills_guardian_emperor")) { - LootTracker.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt() + statsObject.get("kills_guardian_emperor").getAsInt(); + FishingTracker.greatCatches = statsObject.get("items_fished_large_treasure").getAsInt(); + FishingTracker.goodCatches = statsObject.get("items_fished_treasure").getAsInt() - FishingTracker.greatCatches; } else { - LootTracker.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt(); + FishingTracker.goodCatches = statsObject.get("items_fished_treasure").getAsInt(); } - } else if (statsObject.has("kills_guardian_emperor")) { - LootTracker.seaEmperors = statsObject.get("kills_guardian_emperor").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.seaEmperors; - - LootTracker.fishingMilestone = 0; - if (statsObject.has("pet_milestone_sea_creatures_killed")) { - LootTracker.fishingMilestone = statsObject.get("pet_milestone_sea_creatures_killed").getAsInt(); - } - - LootTracker.frozenSteves = 0; - if (statsObject.has("kills_frozen_steve")) { - LootTracker.frozenSteves = statsObject.get("kills_frozen_steve").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.frozenSteves; - - LootTracker.frostyTheSnowmans = 0; - if (statsObject.has("kills_frosty_the_snowman")) { - LootTracker.frostyTheSnowmans = statsObject.get("kills_frosty_the_snowman").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.frostyTheSnowmans; - - LootTracker.grinches = 0; - if (statsObject.has("kills_grinch")) { - LootTracker.grinches = statsObject.get("kills_grinch").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.grinches; - - LootTracker.yetis = 0; - if (statsObject.has("kills_yeti")) { - LootTracker.yetis = statsObject.get("kills_yeti").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.yetis; - - LootTracker.nurseSharks = 0; - if (statsObject.has("kills_nurse_shark")) { - LootTracker.nurseSharks = statsObject.get("kills_nurse_shark").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.nurseSharks; - - LootTracker.blueSharks = 0; - if (statsObject.has("kills_nurse_shark")) { - LootTracker.blueSharks = statsObject.get("kills_blue_shark").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.blueSharks; - - LootTracker.tigerSharks = 0; - if (statsObject.has("kills_nurse_shark")) { - LootTracker.tigerSharks = statsObject.get("kills_tiger_shark").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.tigerSharks; - - LootTracker.greatWhiteSharks = 0; - if (statsObject.has("kills_nurse_shark")) { - LootTracker.greatWhiteSharks = statsObject.get("kills_great_white_shark").getAsInt(); } - LootTracker.seaCreatures += LootTracker.greatWhiteSharks; - - LootTracker.scarecrows = 0; - if (statsObject.has("kills_scarecrow")) { - LootTracker.scarecrows = statsObject.get("kills_scarecrow").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.scarecrows; - - LootTracker.nightmares = 0; - if (statsObject.has("kills_nightmare")) { - LootTracker.nightmares = statsObject.get("kills_nightmare").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.nightmares; - - LootTracker.werewolfs = 0; - if (statsObject.has("kills_werewolf")) { - LootTracker.werewolfs = statsObject.get("kills_werewolf").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.werewolfs; - - LootTracker.phantomFishers = 0; - if (statsObject.has("kills_phantom_fisherman")) { - LootTracker.phantomFishers = statsObject.get("kills_phantom_fisherman").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.phantomFishers; - - LootTracker.grimReapers = 0; - if (statsObject.has("kills_grim_reaper")) { - LootTracker.grimReapers = statsObject.get("kills_grim_reaper").getAsInt(); - } - LootTracker.seaCreatures += LootTracker.grimReapers; - + + FishingTracker.seaCreatures = 0; + + FishingTracker.squids = getSCFromApi(statsObject, "kills_pond_squid"); + FishingTracker.seaWalkers = getSCFromApi(statsObject, "kills_sea_walker"); + FishingTracker.nightSquids = getSCFromApi(statsObject, "kills_night_squid"); + FishingTracker.seaGuardians = getSCFromApi(statsObject, "kills_sea_guardian"); + FishingTracker.seaWitches = getSCFromApi(statsObject, "kills_sea_witch"); + FishingTracker.seaArchers = getSCFromApi(statsObject, "kills_sea_archer"); + FishingTracker.monsterOfTheDeeps = getSCFromApi(statsObject, "kills_zombie_deep") + getSCFromApi(statsObject, "kills_chicken_deep"); + FishingTracker.catfishes = getSCFromApi(statsObject, "kills_catfish"); + FishingTracker.carrotKings = getSCFromApi(statsObject, "kills_carrot_king"); + FishingTracker.seaLeeches = getSCFromApi(statsObject, "kills_sea_leech"); + FishingTracker.guardianDefenders = getSCFromApi(statsObject, "kills_guardian_defender"); + FishingTracker.deepSeaProtectors = getSCFromApi(statsObject, "kills_deep_sea_protector"); + FishingTracker.hydras = getSCFromApi(statsObject, "kills_water_hydra") / 2; + FishingTracker.seaEmperors = getSCFromApi(statsObject, "kills_skeleton_emperor") + getSCFromApi(statsObject, "kills_guardian_emperor"); + FishingTracker.fishingMilestone = getSCFromApi(statsObject, "pet_milestone_sea_creatures_killed"); + FishingTracker.frozenSteves = getSCFromApi(statsObject, "kills_frozen_steve"); + FishingTracker.frostyTheSnowmans = getSCFromApi(statsObject, "kills_frosty_the_snowman"); + FishingTracker.grinches = getSCFromApi(statsObject, "kills_grinch"); + FishingTracker.yetis = getSCFromApi(statsObject, "kills_yeti"); + FishingTracker.nurseSharks = getSCFromApi(statsObject, "kills_nurse_shark"); + FishingTracker.blueSharks = getSCFromApi(statsObject, "kills_blue_shark"); + FishingTracker.tigerSharks = getSCFromApi(statsObject, "kills_tiger_shark"); + FishingTracker.greatWhiteSharks = getSCFromApi(statsObject, "kills_great_white_shark"); + FishingTracker.scarecrows = getSCFromApi(statsObject, "kills_scarecrow"); + FishingTracker.nightmares = getSCFromApi(statsObject, "kills_nightmare"); + FishingTracker.werewolfs = getSCFromApi(statsObject, "kills_werewolf"); + FishingTracker.phantomFishers = getSCFromApi(statsObject, "kills_phantom_fisherman"); + FishingTracker.grimReapers = getSCFromApi(statsObject, "kills_grim_reaper"); + FishingTracker.waterWorms = getSCFromApi(statsObject, "kills_water_worm"); + FishingTracker.poisonedWaterWorms = getSCFromApi(statsObject, "kills_poisoned_water_worm"); + FishingTracker.flamingWorms = getSCFromApi(statsObject, "kills_flaming_worm"); + FishingTracker.lavaBlazes = getSCFromApi(statsObject, "kills_lava_blaze"); + FishingTracker.lavaPigmen = getSCFromApi(statsObject, "kills_lava_pigman"); + FishingTracker.zombieMiners = getSCFromApi(statsObject, "kills_zombie_miner"); + FishingTracker.magmaSlugs = getSCFromApi(statsObject, "kills_magma_slug"); + FishingTracker.moogmas = getSCFromApi(statsObject, "kills_moogma"); + FishingTracker.lavaLeeches = getSCFromApi(statsObject, "kills_lava_leech"); + FishingTracker.pyroclasticWorms = getSCFromApi(statsObject, "kills_pyroclastic_worm"); + FishingTracker.lavaFlames = getSCFromApi(statsObject, "kills_lava_flame"); + FishingTracker.fireEels = getSCFromApi(statsObject, "kills_fire_eel"); + FishingTracker.tauruses = getSCFromApi(statsObject, "kills_taurus"); + FishingTracker.thunders = getSCFromApi(statsObject, "kills_thunder"); + FishingTracker.lordJawbuses = getSCFromApi(statsObject, "kills_lord_jawbus"); + System.out.println("Writing to config..."); - ConfigHandler.writeIntConfig("fishing", "goodCatch", LootTracker.goodCatches); - ConfigHandler.writeIntConfig("fishing", "greatCatch", LootTracker.greatCatches); - ConfigHandler.writeIntConfig("fishing", "seaCreature", LootTracker.seaCreatures); - ConfigHandler.writeIntConfig("fishing", "squid", LootTracker.squids); - ConfigHandler.writeIntConfig("fishing", "seaWalker", LootTracker.seaWalkers); - ConfigHandler.writeIntConfig("fishing", "nightSquid", LootTracker.nightSquids); - ConfigHandler.writeIntConfig("fishing", "seaGuardian", LootTracker.seaGuardians); - ConfigHandler.writeIntConfig("fishing", "seaWitch", LootTracker.seaWitches); - ConfigHandler.writeIntConfig("fishing", "seaArcher", LootTracker.seaArchers); - ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", LootTracker.monsterOfTheDeeps); - ConfigHandler.writeIntConfig("fishing", "catfish", LootTracker.catfishes); - ConfigHandler.writeIntConfig("fishing", "carrotKing", LootTracker.carrotKings); - ConfigHandler.writeIntConfig("fishing", "seaLeech", LootTracker.seaLeeches); - ConfigHandler.writeIntConfig("fishing", "guardianDefender", LootTracker.guardianDefenders); - ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", LootTracker.deepSeaProtectors); - ConfigHandler.writeIntConfig("fishing", "hydra", LootTracker.hydras); - ConfigHandler.writeIntConfig("fishing", "seaEmperor", LootTracker.seaEmperors); - ConfigHandler.writeIntConfig("fishing", "milestone", LootTracker.fishingMilestone); - ConfigHandler.writeIntConfig("fishing", "frozenSteve", LootTracker.frozenSteves); - ConfigHandler.writeIntConfig("fishing", "snowman", LootTracker.frostyTheSnowmans); - ConfigHandler.writeIntConfig("fishing", "grinch", LootTracker.grinches); - ConfigHandler.writeIntConfig("fishing", "yeti", LootTracker.yetis); - ConfigHandler.writeIntConfig("fishing", "nurseShark", LootTracker.nurseSharks); - ConfigHandler.writeIntConfig("fishing", "blueShark", LootTracker.blueSharks); - ConfigHandler.writeIntConfig("fishing", "tigerShark", LootTracker.tigerSharks); - ConfigHandler.writeIntConfig("fishing", "greatWhiteShark", LootTracker.greatWhiteSharks); - ConfigHandler.writeIntConfig("fishing", "scarecrow", LootTracker.scarecrows); - ConfigHandler.writeIntConfig("fishing", "nightmare", LootTracker.nightmares); - ConfigHandler.writeIntConfig("fishing", "werewolf", LootTracker.werewolfs); - ConfigHandler.writeIntConfig("fishing", "phantomFisher", LootTracker.phantomFishers); - ConfigHandler.writeIntConfig("fishing", "grimReaper", LootTracker.grimReapers); - + ConfigHandler.writeIntConfig("fishing", "goodCatch", FishingTracker.goodCatches); + ConfigHandler.writeIntConfig("fishing", "greatCatch", FishingTracker.greatCatches); + ConfigHandler.writeIntConfig("fishing", "seaCreature", FishingTracker.seaCreatures); + ConfigHandler.writeIntConfig("fishing", "squid", FishingTracker.squids); + ConfigHandler.writeIntConfig("fishing", "seaWalker", FishingTracker.seaWalkers); + ConfigHandler.writeIntConfig("fishing", "nightSquid", FishingTracker.nightSquids); + ConfigHandler.writeIntConfig("fishing", "seaGuardian", FishingTracker.seaGuardians); + ConfigHandler.writeIntConfig("fishing", "seaWitch", FishingTracker.seaWitches); + ConfigHandler.writeIntConfig("fishing", "seaArcher", FishingTracker.seaArchers); + ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", FishingTracker.monsterOfTheDeeps); + ConfigHandler.writeIntConfig("fishing", "catfish", FishingTracker.catfishes); + ConfigHandler.writeIntConfig("fishing", "carrotKing", FishingTracker.carrotKings); + ConfigHandler.writeIntConfig("fishing", "seaLeech", FishingTracker.seaLeeches); + ConfigHandler.writeIntConfig("fishing", "guardianDefender", FishingTracker.guardianDefenders); + ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", FishingTracker.deepSeaProtectors); + ConfigHandler.writeIntConfig("fishing", "hydra", FishingTracker.hydras); + ConfigHandler.writeIntConfig("fishing", "seaEmperor", FishingTracker.seaEmperors); + ConfigHandler.writeIntConfig("fishing", "milestone", FishingTracker.fishingMilestone); + ConfigHandler.writeIntConfig("fishing", "frozenSteve", FishingTracker.frozenSteves); + ConfigHandler.writeIntConfig("fishing", "snowman", FishingTracker.frostyTheSnowmans); + ConfigHandler.writeIntConfig("fishing", "grinch", FishingTracker.grinches); + ConfigHandler.writeIntConfig("fishing", "yeti", FishingTracker.yetis); + ConfigHandler.writeIntConfig("fishing", "nurseShark", FishingTracker.nurseSharks); + ConfigHandler.writeIntConfig("fishing", "blueShark", FishingTracker.blueSharks); + ConfigHandler.writeIntConfig("fishing", "tigerShark", FishingTracker.tigerSharks); + ConfigHandler.writeIntConfig("fishing", "greatWhiteShark", FishingTracker.greatWhiteSharks); + ConfigHandler.writeIntConfig("fishing", "scarecrow", FishingTracker.scarecrows); + ConfigHandler.writeIntConfig("fishing", "nightmare", FishingTracker.nightmares); + ConfigHandler.writeIntConfig("fishing", "werewolf", FishingTracker.werewolfs); + ConfigHandler.writeIntConfig("fishing", "phantomFisher", FishingTracker.phantomFishers); + ConfigHandler.writeIntConfig("fishing", "grimReaper", FishingTracker.grimReapers); + ConfigHandler.writeIntConfig("fishing", "waterWorm", FishingTracker.waterWorms); + ConfigHandler.writeIntConfig("fishing", "poisonedWaterWorm", FishingTracker.poisonedWaterWorms); + ConfigHandler.writeIntConfig("fishing", "flamingWorm", FishingTracker.flamingWorms); + ConfigHandler.writeIntConfig("fishing", "lavaBlaze", FishingTracker.lavaBlazes); + ConfigHandler.writeIntConfig("fishing", "lavaPigman", FishingTracker.lavaPigmen); + ConfigHandler.writeIntConfig("fishing", "zombieMiner", FishingTracker.zombieMiners); + ConfigHandler.writeIntConfig("fishing", "magmaSlug", FishingTracker.magmaSlugs); + ConfigHandler.writeIntConfig("fishing", "moogma", FishingTracker.moogmas); + ConfigHandler.writeIntConfig("fishing", "lavaLeech", FishingTracker.lavaLeeches); + ConfigHandler.writeIntConfig("fishing", "pyroclasticWorm", FishingTracker.pyroclasticWorms); + ConfigHandler.writeIntConfig("fishing", "lavaFlame", FishingTracker.lavaFlames); + ConfigHandler.writeIntConfig("fishing", "fireEel", FishingTracker.fireEels); + ConfigHandler.writeIntConfig("fishing", "taurus", FishingTracker.tauruses); + ConfigHandler.writeIntConfig("fishing", "thunder", FishingTracker.thunders); + ConfigHandler.writeIntConfig("fishing", "lordJawbus", FishingTracker.lordJawbuses); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Fishing stats imported.")); }).start(); } + static int getSCFromApi(JsonObject obj, String key) { + int sc = 0; + if (obj.has(key)) sc = obj.get(key).getAsInt(); + FishingTracker.seaCreatures += sc; + return sc; + } + } diff --git a/src/main/java/me/Danker/commands/InventoryCommand.java b/src/main/java/me/Danker/commands/InventoryCommand.java new file mode 100644 index 0000000..66a5725 --- /dev/null +++ b/src/main/java/me/Danker/commands/InventoryCommand.java @@ -0,0 +1,164 @@ +package me.Danker.commands; + +import com.google.gson.JsonObject; +import me.Danker.DankersSkyblockMod; +import me.Danker.handlers.APIHandler; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiChest; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryBasic; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompressedStreamTools; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +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 InventoryCommand extends CommandBase { + + public static GuiChest chest = null; + + @Override + public String getCommandName() { + return "inventory"; + } + + @Override + public List<String> getCommandAliases() { + return Collections.singletonList("inv"); + } + + @Override + public String getCommandUsage(ICommandSender arg0) { + return "/" + getCommandName() + " [name]"; + } + + public static String usage(ICommandSender arg0) { + return new InventoryCommand().getCommandUsage(arg0); + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { + if (args.length == 1) { + return Utils.getMatchingPlayers(args[0]); + } + return null; + } + + @Override + public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { + // MULTI THREAD DRIFTING + new Thread(() -> { + EntityPlayer player = (EntityPlayer) arg0; + Minecraft mc = Minecraft.getMinecraft(); + + // Check key + String key = ConfigHandler.getString("api", "APIKey"); + if (key.equals("")) { + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey.")); + return; + } + + // Get UUID for Hypixel API requests + String username; + String uuid; + if (arg1.length == 0) { + username = player.getName(); + uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking inventory of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); + } else { + username = arg1[0]; + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking inventory of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); + uuid = APIHandler.getUUID(username); + } + + // Find stats of latest profile + String latestProfile = APIHandler.getLatestProfileID(uuid, key); + if (latestProfile == null) return; + + String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; + System.out.println("Fetching profile..."); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); + if (!profileResponse.get("success").getAsBoolean()) { + String reason = profileResponse.get("cause").getAsString(); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason)); + return; + } + + System.out.println("Fetching inventory..."); + JsonObject userObject = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject(); + + IInventory inventory = new InventoryBasic(username + "'s Inventory:", true, 54); + + String armourBase64 = userObject.get("inv_armor").getAsJsonObject().get("data").getAsString(); + InputStream armourStream = new ByteArrayInputStream(Base64.getDecoder().decode(armourBase64)); + + try { + // Armour + NBTTagCompound armour = CompressedStreamTools.readCompressed(armourStream); + NBTTagList armourList = armour.getTagList("i", 10); + + for (int i = 0; i < armourList.tagCount(); i++) { + NBTTagCompound item = armourList.getCompoundTagAt(i); + if (item.hasNoTags()) continue; + inventory.setInventorySlotContents(7 - i * 2, ItemStack.loadItemStackFromNBT(item)); + } + + ItemStack glass = new ItemStack(Blocks.stained_glass_pane, 1, 15); + glass.setStackDisplayName(""); + for (int i = 0; i < 18; i++) { + if (i < 8 && i % 2 == 1) continue; + inventory.setInventorySlotContents(i, glass); + } + + // Inventory + if (userObject.has("inv_contents")) { + String invBase64 = userObject.get("inv_contents").getAsJsonObject().get("data").getAsString(); + InputStream invStream = new ByteArrayInputStream(Base64.getDecoder().decode(invBase64)); + + NBTTagCompound inv = CompressedStreamTools.readCompressed(invStream); + NBTTagList invList = inv.getTagList("i", 10); + + for (int i = 0; i < invList.tagCount(); i++) { + NBTTagCompound item = invList.getCompoundTagAt(i); + if (item.hasNoTags()) continue; + inventory.setInventorySlotContents(i < 9 ? i + 45 : i + 9, ItemStack.loadItemStackFromNBT(item)); + } + } else { + ItemStack notEnabled = new ItemStack(Blocks.barrier, 1, 0); + notEnabled.setStackDisplayName(EnumChatFormatting.RED + "Inventory API not enabled."); + for (int i = 18; i < 54; i++) { + inventory.setInventorySlotContents(i, notEnabled); + } + } + } catch (IOException ex) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "An error has occurred while reading inventory data. See logs for more info.")); + ex.printStackTrace(); + } + + chest = new GuiChest(player.inventory, inventory); + DankersSkyblockMod.guiToOpen = "inventory"; + }).start(); + } + +} diff --git a/src/main/java/me/Danker/commands/LobbyBankCommand.java b/src/main/java/me/Danker/commands/LobbyBankCommand.java index 886077c..fc63d89 100644 --- a/src/main/java/me/Danker/commands/LobbyBankCommand.java +++ b/src/main/java/me/Danker/commands/LobbyBankCommand.java @@ -5,6 +5,7 @@ import com.google.gson.JsonObject; import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.network.NetworkPlayerInfo; import net.minecraft.command.CommandBase; @@ -55,7 +56,7 @@ public class LobbyBankCommand extends CommandBase { try { // Create deep copy of players to prevent passing reference and ConcurrentModificationException 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.")); + playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking bank of lobby. Estimated time: " + (int) (Utils.getMatchingPlayers("").size() * 1.2 + 1) + " seconds.")); // Send request every .6 seconds, leaving room for another 20 requests per minute for (final NetworkPlayerInfo player : players) { @@ -65,7 +66,7 @@ public class LobbyBankCommand extends CommandBase { long biggestLastSave = 0; int profileIndex = -1; Thread.sleep(600); - JsonObject profileResponse = APIHandler.getResponse("https://api.hypixel.net/skyblock/profiles?uuid=" + UUID + "&key=" + key); + JsonObject profileResponse = APIHandler.getResponse("https://api.hypixel.net/skyblock/profiles?uuid=" + UUID + "&key=" + key, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); System.out.println("User " + player.getGameProfile().getName() + " failed with reason: " + reason); diff --git a/src/main/java/me/Danker/commands/LobbySkillsCommand.java b/src/main/java/me/Danker/commands/LobbySkillsCommand.java index b6cd87d..f9f1271 100644 --- a/src/main/java/me/Danker/commands/LobbySkillsCommand.java +++ b/src/main/java/me/Danker/commands/LobbySkillsCommand.java @@ -58,7 +58,7 @@ public class LobbySkillsCommand extends CommandBase { try { // Create deep copy of players to prevent passing reference and ConcurrentModificationException 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.")); + playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking skill average of lobby. Estimated time: " + (int) (Utils.getMatchingPlayers("").size() * 1.2 + 1) + " seconds.")); // Send request every .6 seconds, leaving room for another 20 requests per minute for (final NetworkPlayerInfo player : players) { @@ -68,7 +68,7 @@ public class LobbySkillsCommand extends CommandBase { long biggestLastSave = 0; int profileIndex = -1; Thread.sleep(600); - JsonObject profileResponse = APIHandler.getResponse("https://api.hypixel.net/skyblock/profiles?uuid=" + UUID + "&key=" + key); + JsonObject profileResponse = APIHandler.getResponse("https://api.hypixel.net/skyblock/profiles?uuid=" + UUID + "&key=" + key, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); System.out.println("User " + player.getGameProfile().getName() + " failed with reason: " + reason); @@ -134,7 +134,7 @@ public class LobbySkillsCommand extends CommandBase { } else { Thread.sleep(600); // Sleep for another request System.out.println("Fetching skills from achievement API"); - JsonObject playerObject = APIHandler.getResponse("https://api.hypixel.net/player?uuid=" + UUID + "&key=" + key); + JsonObject playerObject = APIHandler.getResponse("https://api.hypixel.net/player?uuid=" + UUID + "&key=" + key, true); if (!playerObject.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); diff --git a/src/main/java/me/Danker/commands/LootCommand.java b/src/main/java/me/Danker/commands/LootCommand.java index 51347a3..3be46a4 100644 --- a/src/main/java/me/Danker/commands/LootCommand.java +++ b/src/main/java/me/Danker/commands/LootCommand.java @@ -1,7 +1,7 @@ package me.Danker.commands; import me.Danker.DankersSkyblockMod; -import me.Danker.features.loot.LootTracker; +import me.Danker.features.loot.*; import me.Danker.utils.Utils; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -24,7 +24,7 @@ public class LootCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/mythological> [winter/festival/spooky/f(1-7)/session]"; + return "/" + getCommandName() + " <zombie/spider/wolf/enderman/blaze/fishing/catacombs/mythological> [winter/festival/spooky/ch/lava/f(1-7)/mm/session]"; } public static String usage(ICommandSender arg0) { @@ -39,11 +39,11 @@ public class LootCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "mythological"); + return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "enderman", "blaze", "fishing", "catacombs", "mythological"); } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { - return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); + return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "ch", "lava", "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"); + return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6", "f7", "floor7", "mm", "master"); } else if (args.length > 1) { return getListOfStringsMatchingLastWord(args, "session"); } @@ -64,259 +64,430 @@ public class LootCommand extends CommandBase { String bossesBetween; String drop20; NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); - boolean showSession = false; - if (arg1[arg1.length - 1].equalsIgnoreCase("session")) showSession = true; + boolean showSession = arg1[arg1.length - 1].equalsIgnoreCase("session"); switch (arg1[0].toLowerCase()) { case "wolf": if (showSession) { - if (LootTracker.wolfTimeSession == -1) { + if (WolfTracker.wolfTimeSession == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.wolfTimeSession, timeNow); + timeBetween = Utils.getTimeBetween(WolfTracker.wolfTimeSession, timeNow); } - if (LootTracker.wolfBossesSession == -1) { + if (WolfTracker.wolfBossesSession == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.wolfBossesSession); + bossesBetween = nf.format(WolfTracker.wolfBossesSession); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.wolfWheelsSession); + drop20 = nf.format(WolfTracker.wolfWheelsSession); } else { - drop20 = nf.format(LootTracker.wolfWheelsDropsSession) + " times"; + drop20 = nf.format(WolfTracker.wolfWheelsDropsSession) + " times"; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.DARK_AQUA + EnumChatFormatting.BOLD + " Sven Loot Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " Svens Killed: " + nf.format(LootTracker.wolfSvensSession) + "\n" + - EnumChatFormatting.GREEN + " Wolf Teeth: " + nf.format(LootTracker.wolfTeethSession) + "\n" + + EnumChatFormatting.GOLD + " Svens Killed: " + nf.format(WolfTracker.wolfSvensSession) + "\n" + + EnumChatFormatting.GREEN + " Wolf Teeth: " + nf.format(WolfTracker.wolfTeethSession) + "\n" + EnumChatFormatting.BLUE + " Hamster Wheels: " + drop20 + "\n" + - EnumChatFormatting.AQUA + " Spirit Runes: " + LootTracker.wolfSpiritsSession + "\n" + - EnumChatFormatting.WHITE + " Critical VI Books: " + LootTracker.wolfBooksSession + "\n" + - EnumChatFormatting.DARK_RED + " Red Claw Eggs: " + LootTracker.wolfEggsSession + "\n" + - EnumChatFormatting.GOLD + " Couture Runes: " + LootTracker.wolfCouturesSession + "\n" + - EnumChatFormatting.AQUA + " Grizzly Baits: " + LootTracker.wolfBaitsSession + "\n" + - EnumChatFormatting.DARK_PURPLE + " Overfluxes: " + LootTracker.wolfFluxesSession + "\n" + + EnumChatFormatting.AQUA + " Spirit Runes: " + WolfTracker.wolfSpiritsSession + "\n" + + EnumChatFormatting.WHITE + " Critical VI Books: " + WolfTracker.wolfBooksSession + "\n" + + EnumChatFormatting.DARK_RED + " Red Claw Eggs: " + WolfTracker.wolfEggsSession + "\n" + + EnumChatFormatting.GOLD + " Couture Runes: " + WolfTracker.wolfCouturesSession + "\n" + + EnumChatFormatting.AQUA + " Grizzly Baits: " + WolfTracker.wolfBaitsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + " Overfluxes: " + WolfTracker.wolfFluxesSession + "\n" + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); return; } - if (LootTracker.wolfTime == -1) { + if (WolfTracker.wolfTime == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.wolfTime, timeNow); + timeBetween = Utils.getTimeBetween(WolfTracker.wolfTime, timeNow); } - if (LootTracker.wolfBosses == -1) { + if (WolfTracker.wolfBosses == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.wolfBosses); + bossesBetween = nf.format(WolfTracker.wolfBosses); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.wolfWheels); + drop20 = nf.format(WolfTracker.wolfWheels); } else { - drop20 = nf.format(LootTracker.wolfWheelsDrops) + " times"; + drop20 = nf.format(WolfTracker.wolfWheelsDrops) + " times"; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.DARK_AQUA + EnumChatFormatting.BOLD + " Sven Loot Summary:\n" + - EnumChatFormatting.GOLD + " Svens Killed: " + nf.format(LootTracker.wolfSvens) + "\n" + - EnumChatFormatting.GREEN + " Wolf Teeth: " + nf.format(LootTracker.wolfTeeth) + "\n" + + EnumChatFormatting.GOLD + " Svens Killed: " + nf.format(WolfTracker.wolfSvens) + "\n" + + EnumChatFormatting.GREEN + " Wolf Teeth: " + nf.format(WolfTracker.wolfTeeth) + "\n" + EnumChatFormatting.BLUE + " Hamster Wheels: " + drop20 + "\n" + - EnumChatFormatting.AQUA + " Spirit Runes: " + LootTracker.wolfSpirits + "\n" + - EnumChatFormatting.WHITE + " Critical VI Books: " + LootTracker.wolfBooks + "\n" + - EnumChatFormatting.DARK_RED + " Red Claw Eggs: " + LootTracker.wolfEggs + "\n" + - EnumChatFormatting.GOLD + " Couture Runes: " + LootTracker.wolfCoutures + "\n" + - EnumChatFormatting.AQUA + " Grizzly Baits: " + LootTracker.wolfBaits + "\n" + - EnumChatFormatting.DARK_PURPLE + " Overfluxes: " + LootTracker.wolfFluxes + "\n" + + EnumChatFormatting.AQUA + " Spirit Runes: " + WolfTracker.wolfSpirits + "\n" + + EnumChatFormatting.WHITE + " Critical VI Books: " + WolfTracker.wolfBooks + "\n" + + EnumChatFormatting.DARK_RED + " Red Claw Eggs: " + WolfTracker.wolfEggs + "\n" + + EnumChatFormatting.GOLD + " Couture Runes: " + WolfTracker.wolfCoutures + "\n" + + EnumChatFormatting.AQUA + " Grizzly Baits: " + WolfTracker.wolfBaits + "\n" + + EnumChatFormatting.DARK_PURPLE + " Overfluxes: " + WolfTracker.wolfFluxes + "\n" + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); break; case "spider": if (showSession) { - if (LootTracker.spiderTimeSession == -1) { + if (SpiderTracker.spiderTimeSession == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.spiderTimeSession, timeNow); + timeBetween = Utils.getTimeBetween(SpiderTracker.spiderTimeSession, timeNow); } - if (LootTracker.spiderBossesSession == -1) { + if (SpiderTracker.spiderBossesSession == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.spiderBossesSession); + bossesBetween = nf.format(SpiderTracker.spiderBossesSession); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.spiderTAPSession); + drop20 = nf.format(SpiderTracker.spiderTAPSession); } else { - drop20 = nf.format(LootTracker.spiderTAPDropsSession) + " times"; + drop20 = nf.format(SpiderTracker.spiderTAPDropsSession) + " times"; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " Spider Loot Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " Tarantulas Killed: " + nf.format(LootTracker.spiderTarantulasSession) + "\n" + - EnumChatFormatting.GREEN + " Tarantula Webs: " + nf.format(LootTracker.spiderWebsSession) + "\n" + + EnumChatFormatting.GOLD + " Tarantulas Killed: " + nf.format(SpiderTracker.spiderTarantulasSession) + "\n" + + EnumChatFormatting.GREEN + " Tarantula Webs: " + nf.format(SpiderTracker.spiderWebsSession) + "\n" + EnumChatFormatting.DARK_GREEN + " Arrow Poison: " + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + " Bite Runes: " + LootTracker.spiderBitesSession + "\n" + - EnumChatFormatting.WHITE + " Bane VI Books: " + LootTracker.spiderBooksSession + "\n" + - EnumChatFormatting.AQUA + " Spider Catalysts: " + LootTracker.spiderCatalystsSession + "\n" + - EnumChatFormatting.DARK_PURPLE + " Tarantula Talismans: " + LootTracker.spiderTalismansSession + "\n" + - EnumChatFormatting.LIGHT_PURPLE + " Fly Swatters: " + LootTracker.spiderSwattersSession + "\n" + - EnumChatFormatting.GOLD + " Digested Mosquitos: " + LootTracker.spiderMosquitosSession + "\n" + + EnumChatFormatting.DARK_GRAY + " Bite Runes: " + SpiderTracker.spiderBitesSession + "\n" + + EnumChatFormatting.WHITE + " Bane VI Books: " + SpiderTracker.spiderBooksSession + "\n" + + EnumChatFormatting.AQUA + " Spider Catalysts: " + SpiderTracker.spiderCatalystsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + " Tarantula Talismans: " + SpiderTracker.spiderTalismansSession + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Fly Swatters: " + SpiderTracker.spiderSwattersSession + "\n" + + EnumChatFormatting.GOLD + " Digested Mosquitos: " + SpiderTracker.spiderMosquitosSession + "\n" + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " -------------------")); return; } - if (LootTracker.spiderTime == -1) { + if (SpiderTracker.spiderTime == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.spiderTime, timeNow); + timeBetween = Utils.getTimeBetween(SpiderTracker.spiderTime, timeNow); } - if (LootTracker.spiderBosses == -1) { + if (SpiderTracker.spiderBosses == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.spiderBosses); + bossesBetween = nf.format(SpiderTracker.spiderBosses); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.spiderTAP); + drop20 = nf.format(SpiderTracker.spiderTAP); } else { - drop20 = nf.format(LootTracker.spiderTAPDrops) + " times"; + drop20 = nf.format(SpiderTracker.spiderTAPDrops) + " times"; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " Spider Loot Summary:\n" + - EnumChatFormatting.GOLD + " Tarantulas Killed: " + nf.format(LootTracker.spiderTarantulas) + "\n" + - EnumChatFormatting.GREEN + " Tarantula Webs: " + nf.format(LootTracker.spiderWebs) + "\n" + + EnumChatFormatting.GOLD + " Tarantulas Killed: " + nf.format(SpiderTracker.spiderTarantulas) + "\n" + + EnumChatFormatting.GREEN + " Tarantula Webs: " + nf.format(SpiderTracker.spiderWebs) + "\n" + EnumChatFormatting.DARK_GREEN + " Arrow Poison: " + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + " Bite Runes: " + LootTracker.spiderBites + "\n" + - EnumChatFormatting.WHITE + " Bane VI Books: " + LootTracker.spiderBooks + "\n" + - EnumChatFormatting.AQUA + " Spider Catalysts: " + LootTracker.spiderCatalysts + "\n" + - EnumChatFormatting.DARK_PURPLE + " Tarantula Talismans: " + LootTracker.spiderTalismans + "\n" + - EnumChatFormatting.LIGHT_PURPLE + " Fly Swatters: " + LootTracker.spiderSwatters + "\n" + - EnumChatFormatting.GOLD + " Digested Mosquitos: " + LootTracker.spiderMosquitos + "\n" + + EnumChatFormatting.DARK_GRAY + " Bite Runes: " + SpiderTracker.spiderBites + "\n" + + EnumChatFormatting.WHITE + " Bane VI Books: " + SpiderTracker.spiderBooks + "\n" + + EnumChatFormatting.AQUA + " Spider Catalysts: " + SpiderTracker.spiderCatalysts + "\n" + + EnumChatFormatting.DARK_PURPLE + " Tarantula Talismans: " + SpiderTracker.spiderTalismans + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Fly Swatters: " + SpiderTracker.spiderSwatters + "\n" + + EnumChatFormatting.GOLD + " Digested Mosquitos: " + SpiderTracker.spiderMosquitos + "\n" + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " -------------------")); break; case "zombie": if (showSession) { - if (LootTracker.zombieTimeSession == -1) { + if (ZombieTracker.zombieTimeSession == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.zombieTimeSession, timeNow); + timeBetween = Utils.getTimeBetween(ZombieTracker.zombieTimeSession, timeNow); } - if (LootTracker.zombieBossesSession == -1) { + if (ZombieTracker.zombieBossesSession == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.zombieBossesSession); + bossesBetween = nf.format(ZombieTracker.zombieBossesSession); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.zombieFoulFleshSession); + drop20 = nf.format(ZombieTracker.zombieFoulFleshSession); } else { - drop20 = nf.format(LootTracker.zombieFoulFleshDropsSession) + " times"; + drop20 = nf.format(ZombieTracker.zombieFoulFleshDropsSession) + " times"; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + " Zombie Loot Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " Revs Killed: " + nf.format(LootTracker.zombieRevsSession) + "\n" + - EnumChatFormatting.GREEN + " Revenant Flesh: " + nf.format(LootTracker.zombieRevFleshSession) + "\n" + + EnumChatFormatting.GOLD + " Revs Killed: " + nf.format(ZombieTracker.zombieRevsSession) + "\n" + + EnumChatFormatting.GREEN + " Revenant Flesh: " + nf.format(ZombieTracker.zombieRevFleshSession) + "\n" + + EnumChatFormatting.GREEN + " Revenant Viscera: " + nf.format(ZombieTracker.zombieRevVisceraSession) + "\n" + EnumChatFormatting.BLUE + " Foul Flesh: " + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + " Pestilence Runes: " +LootTracker.zombiePestilencesSession + "\n" + - EnumChatFormatting.WHITE + " Smite VI Books: " + LootTracker.zombieBooksSession + "\n" + - EnumChatFormatting.AQUA + " Undead Catalysts: " + LootTracker.zombieUndeadCatasSession + "\n" + - EnumChatFormatting.DARK_PURPLE + " Beheaded Horrors: " + LootTracker.zombieBeheadedsSession + "\n" + - EnumChatFormatting.RED + " Revenant Catalysts: " + LootTracker.zombieRevCatasSession + "\n" + - EnumChatFormatting.DARK_GREEN + " Snake Runes: " + LootTracker.zombieSnakesSession + "\n" + - EnumChatFormatting.GOLD + " Scythe Blades: " + LootTracker.zombieScythesSession + "\n" + - EnumChatFormatting.RED + " Shard of the Shreddeds: " + LootTracker.zombieShardsSession + "\n" + - EnumChatFormatting.RED + " Warden Hearts: " + LootTracker.zombieWardenHeartsSession + "\n" + + EnumChatFormatting.DARK_GREEN + " Pestilence Runes: " +ZombieTracker.zombiePestilencesSession + "\n" + + EnumChatFormatting.WHITE + " Smite VI Books: " + ZombieTracker.zombieBooksSession + "\n" + + EnumChatFormatting.WHITE + " Smite VII Books: " + ZombieTracker.zombieBooksT7Session + "\n" + + EnumChatFormatting.AQUA + " Undead Catalysts: " + ZombieTracker.zombieUndeadCatasSession + "\n" + + EnumChatFormatting.DARK_PURPLE + " Beheaded Horrors: " + ZombieTracker.zombieBeheadedsSession + "\n" + + EnumChatFormatting.RED + " Revenant Catalysts: " + ZombieTracker.zombieRevCatasSession + "\n" + + EnumChatFormatting.DARK_GREEN + " Snake Runes: " + ZombieTracker.zombieSnakesSession + "\n" + + EnumChatFormatting.GOLD + " Scythe Blades: " + ZombieTracker.zombieScythesSession + "\n" + + EnumChatFormatting.RED + " Shard of the Shreddeds: " + ZombieTracker.zombieShardsSession + "\n" + + EnumChatFormatting.RED + " Warden Hearts: " + ZombieTracker.zombieWardenHeartsSession + "\n" + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + " -------------------")); return; } - if (LootTracker.zombieTime == -1) { + if (ZombieTracker.zombieTime == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.zombieTime, timeNow); + timeBetween = Utils.getTimeBetween(ZombieTracker.zombieTime, timeNow); } - if (LootTracker.zombieBosses == -1) { + if (ZombieTracker.zombieBosses == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.zombieBosses); + bossesBetween = nf.format(ZombieTracker.zombieBosses); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.zombieFoulFlesh); + drop20 = nf.format(ZombieTracker.zombieFoulFlesh); } else { - drop20 = nf.format(LootTracker.zombieFoulFleshDrops) + " times"; + drop20 = nf.format(ZombieTracker.zombieFoulFleshDrops) + " times"; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + " Zombie Loot Summary:\n" + - EnumChatFormatting.GOLD + " Revs Killed: " + nf.format(LootTracker.zombieRevs) + "\n" + - EnumChatFormatting.GREEN + " Revenant Flesh: " + nf.format(LootTracker.zombieRevFlesh) + "\n" + + EnumChatFormatting.GOLD + " Revs Killed: " + nf.format(ZombieTracker.zombieRevs) + "\n" + + EnumChatFormatting.GREEN + " Revenant Flesh: " + nf.format(ZombieTracker.zombieRevFlesh) + "\n" + + EnumChatFormatting.GREEN + " Revenant Viscera: " + nf.format(ZombieTracker.zombieRevViscera) + "\n" + EnumChatFormatting.BLUE + " Foul Flesh: " + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + " Pestilence Runes: " + LootTracker.zombiePestilences + "\n" + - EnumChatFormatting.WHITE + " Smite VI Books: " + LootTracker.zombieBooks + "\n" + - EnumChatFormatting.AQUA + " Undead Catalysts: " + LootTracker.zombieUndeadCatas + "\n" + - EnumChatFormatting.DARK_PURPLE + " Beheaded Horrors: " + LootTracker.zombieBeheadeds + "\n" + - EnumChatFormatting.RED + " Revenant Catalysts: " + LootTracker.zombieRevCatas + "\n" + - EnumChatFormatting.DARK_GREEN + " Snake Runes: " + LootTracker.zombieSnakes + "\n" + - EnumChatFormatting.GOLD + " Scythe Blades: " + LootTracker.zombieScythes + "\n" + - EnumChatFormatting.RED + " Shard of the Shreddeds: " + LootTracker.zombieShards + "\n" + - EnumChatFormatting.RED + " Warden Hearts: " + LootTracker.zombieWardenHearts + "\n" + + EnumChatFormatting.DARK_GREEN + " Pestilence Runes: " + ZombieTracker.zombiePestilences + "\n" + + EnumChatFormatting.WHITE + " Smite VI Books: " + ZombieTracker.zombieBooks + "\n" + + EnumChatFormatting.WHITE + " Smite VII Books: " + ZombieTracker.zombieBooksT7 + "\n" + + EnumChatFormatting.AQUA + " Undead Catalysts: " + ZombieTracker.zombieUndeadCatas + "\n" + + EnumChatFormatting.DARK_PURPLE + " Beheaded Horrors: " + ZombieTracker.zombieBeheadeds + "\n" + + EnumChatFormatting.RED + " Revenant Catalysts: " + ZombieTracker.zombieRevCatas + "\n" + + EnumChatFormatting.DARK_GREEN + " Snake Runes: " + ZombieTracker.zombieSnakes + "\n" + + EnumChatFormatting.GOLD + " Scythe Blades: " + ZombieTracker.zombieScythes + "\n" + + EnumChatFormatting.RED + " Shard of the Shreddeds: " + ZombieTracker.zombieShards + "\n" + + EnumChatFormatting.RED + " Warden Hearts: " + ZombieTracker.zombieWardenHearts + "\n" + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + " -------------------")); break; + case "enderman": + if (showSession) { + if (EndermanTracker.endermanTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(EndermanTracker.endermanTimeSession, timeNow); + } + if (EndermanTracker.endermanBossesSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(EndermanTracker.endermanBossesSession); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(EndermanTracker.endermanTAPSession); + } else { + drop20 = nf.format(EndermanTracker.endermanTAPDropsSession) + " times"; + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + " Enderman Loot Summary (Current Session):\n" + + EnumChatFormatting.GOLD + " Voidglooms Killed: " + nf.format(EndermanTracker.endermanVoidgloomsSession) + "\n" + + EnumChatFormatting.DARK_GRAY + " Null Spheres: " + nf.format(EndermanTracker.endermanNullSpheresSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Arrow Poison: " + drop20 + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Endersnake Runes: " + EndermanTracker.endermanEndersnakesSession + "\n" + + EnumChatFormatting.DARK_GREEN + " Summoning Eyes: " + EndermanTracker.endermanSummoningEyesSession + "\n" + + EnumChatFormatting.AQUA + " Mana Steal Books: " + EndermanTracker.endermanManaBooksSession + "\n" + + EnumChatFormatting.BLUE + " Transmission Tuners: " + EndermanTracker.endermanTunersSession + "\n" + + EnumChatFormatting.YELLOW + " Null Atoms: " + EndermanTracker.endermanAtomsSession + "\n" + + EnumChatFormatting.AQUA + " Espresso Machines: " + EndermanTracker.endermanEspressoMachinesSession + "\n" + + EnumChatFormatting.WHITE + " Smarty Pants Books: " + EndermanTracker.endermanSmartyBooksSession + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " End Runes: " + EndermanTracker.endermanEndRunesSession + "\n" + + EnumChatFormatting.RED + " Blood Chalices: " + EndermanTracker.endermanChalicesSession + "\n" + + EnumChatFormatting.RED + " Sinful Dice: " + EndermanTracker.endermanDiceSession + "\n" + + EnumChatFormatting.DARK_PURPLE + " Artifact Upgrader: " + EndermanTracker.endermanArtifactsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + " Enderman Skins: " + EndermanTracker.endermanSkinsSession + "\n" + + EnumChatFormatting.GRAY + " Enchant Runes: " + EndermanTracker.endermanEnchantRunesSession + "\n" + + EnumChatFormatting.GOLD + " Etherwarp Mergers: " + EndermanTracker.endermanMergersSession + "\n" + + EnumChatFormatting.GOLD + " Judgement Cores: " + EndermanTracker.endermanCoresSession + "\n" + + EnumChatFormatting.RED + " Ender Slayer VII Books: " + EndermanTracker.endermanEnderBooksSession + "\n" + + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + + EnumChatFormatting.DARK_PURPLE + EnumChatFormatting.BOLD + " -------------------")); + return; + } + + if (EndermanTracker.endermanTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(EndermanTracker.endermanTime, timeNow); + } + if (EndermanTracker.endermanBosses == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(EndermanTracker.endermanBosses); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(EndermanTracker.endermanTAP); + } else { + drop20 = nf.format(EndermanTracker.endermanTAPDrops) + " times"; + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + " Enderman Loot Summary:\n" + + EnumChatFormatting.GOLD + " Voidglooms Killed: " + nf.format(EndermanTracker.endermanVoidglooms) + "\n" + + EnumChatFormatting.DARK_GRAY + " Null Spheres: " + nf.format(EndermanTracker.endermanNullSpheres) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Arrow Poison: " + drop20 + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Endersnake Runes: " + EndermanTracker.endermanEndersnakes + "\n" + + EnumChatFormatting.DARK_GREEN + " Summoning Eyes: " + EndermanTracker.endermanSummoningEyes + "\n" + + EnumChatFormatting.AQUA + " Mana Steal Books: " + EndermanTracker.endermanManaBooks + "\n" + + EnumChatFormatting.BLUE + " Transmission Tuners: " + EndermanTracker.endermanTuners + "\n" + + EnumChatFormatting.YELLOW + " Null Atoms: " + EndermanTracker.endermanAtoms + "\n" + + EnumChatFormatting.AQUA + " Espresso Machines: " + EndermanTracker.endermanEspressoMachines + "\n" + + EnumChatFormatting.WHITE + " Smarty Pants Books: " + EndermanTracker.endermanSmartyBooks + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " End Runes: " + EndermanTracker.endermanEndRunes + "\n" + + EnumChatFormatting.RED + " Blood Chalices: " + EndermanTracker.endermanChalices + "\n" + + EnumChatFormatting.RED + " Sinful Dice: " + EndermanTracker.endermanDice + "\n" + + EnumChatFormatting.DARK_PURPLE + " Artifact Upgrader: " + EndermanTracker.endermanArtifacts + "\n" + + EnumChatFormatting.DARK_PURPLE + " Enderman Skins: " + EndermanTracker.endermanSkins + "\n" + + EnumChatFormatting.GRAY + " Enchant Runes: " + EndermanTracker.endermanEnchantRunes + "\n" + + EnumChatFormatting.GOLD + " Etherwarp Mergers: " + EndermanTracker.endermanMergers + "\n" + + EnumChatFormatting.GOLD + " Judgement Cores: " + EndermanTracker.endermanCores + "\n" + + EnumChatFormatting.RED + " Ender Slayer VII Books: " + EndermanTracker.endermanEnderBooks + "\n" + + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + + EnumChatFormatting.DARK_PURPLE + EnumChatFormatting.BOLD + " -------------------")); + break; + case "blaze": + if (showSession) { + if (BlazeTracker.timeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(BlazeTracker.timeSession, timeNow); + } + if (BlazeTracker.bossesSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(BlazeTracker.bossesSession); + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " Blaze Loot Summary (Current Session):\n" + + EnumChatFormatting.GOLD + " Demonlords Killed: " + nf.format(BlazeTracker.demonlordsSession) + "\n" + + EnumChatFormatting.GRAY + " Derelict Ashes: " + nf.format(BlazeTracker.derelictAshesSession) + "\n" + + EnumChatFormatting.RED + " Lavatear Runes: " + nf.format(BlazeTracker.lavatearRunesSession) + "\n" + + EnumChatFormatting.AQUA + " Splash Potions: " + nf.format(BlazeTracker.splashPotionsSession) + "\n" + + EnumChatFormatting.DARK_RED + " Magma Arrows: " + nf.format(BlazeTracker.magmaArrowsSession) + "\n" + + EnumChatFormatting.DARK_AQUA + " Mana Disintegrators: " + nf.format(BlazeTracker.manaDisintegratorsSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Scorched Books: " + nf.format(BlazeTracker.scorchedBooksSession) + "\n" + + EnumChatFormatting.WHITE + " Kelvin Inverters: " + nf.format(BlazeTracker.kelvinInvertersSession) + "\n" + + EnumChatFormatting.BLUE + " Blaze Rod Distillates: " + nf.format(BlazeTracker.blazeRodDistillatesSession) + "\n" + + EnumChatFormatting.BLUE + " Glowstone Distillates: " + nf.format(BlazeTracker.glowstoneDistillatesSession) + "\n" + + EnumChatFormatting.BLUE + " Magma Cream Distillates: " + nf.format(BlazeTracker.magmaCreamDistillatesSession) + "\n" + + EnumChatFormatting.BLUE + " Nether Wart Distillates: " + nf.format(BlazeTracker.netherWartDistillatesSession) + "\n" + + EnumChatFormatting.BLUE + " Gabagool Distillates: " + nf.format(BlazeTracker.gabagoolDistillatesSession) + "\n" + + EnumChatFormatting.RED + " Scorched Power Crystals: " + nf.format(BlazeTracker.scorchedPowerCrystalsSession) + "\n" + + EnumChatFormatting.RED + " Fire Aspect Books: " + nf.format(BlazeTracker.fireAspectBooksSession) + "\n" + + EnumChatFormatting.GOLD + " Fiery Burst Runes: " + nf.format(BlazeTracker.fieryBurstRunesSession) + "\n" + + EnumChatFormatting.WHITE + " Opal Gems: " + nf.format(BlazeTracker.opalGemsSession) + "\n" + + EnumChatFormatting.RED + " Archfiend Dice: " + nf.format(BlazeTracker.archfiendDiceSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Duplex Books: " + nf.format(BlazeTracker.duplexBooksSession) + "\n" + + EnumChatFormatting.GOLD + " High Class Archfiend Dice: " + nf.format(BlazeTracker.highClassArchfiendDiceSession) + "\n" + + EnumChatFormatting.GOLD + " Engineering Plans: " + nf.format(BlazeTracker.engineeringPlansSession) + "\n" + + EnumChatFormatting.GOLD + " Subzero Inverters: " + nf.format(BlazeTracker.subzeroInvertersSession) + "\n" + + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " -------------------")); + return; + } + + if (BlazeTracker.time == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(BlazeTracker.time, timeNow); + } + if (BlazeTracker.bosses == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(BlazeTracker.bosses); + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " Blaze Loot Summary:\n" + + EnumChatFormatting.GOLD + " Demonlords Killed: " + nf.format(BlazeTracker.demonlords) + "\n" + + EnumChatFormatting.GRAY + " Derelict Ashes: " + nf.format(BlazeTracker.derelictAshes) + "\n" + + EnumChatFormatting.RED + " Lavatear Runes: " + nf.format(BlazeTracker.lavatearRunes) + "\n" + + EnumChatFormatting.AQUA + " Splash Potions: " + nf.format(BlazeTracker.splashPotions) + "\n" + + EnumChatFormatting.DARK_RED + " Magma Arrows: " + nf.format(BlazeTracker.magmaArrows) + "\n" + + EnumChatFormatting.DARK_AQUA + " Mana Disintegrators: " + nf.format(BlazeTracker.manaDisintegrators) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Scorched Books: " + nf.format(BlazeTracker.scorchedBooks) + "\n" + + EnumChatFormatting.WHITE + " Kelvin Inverters: " + nf.format(BlazeTracker.kelvinInverters) + "\n" + + EnumChatFormatting.BLUE + " Blaze Rod Distillates: " + nf.format(BlazeTracker.blazeRodDistillates) + "\n" + + EnumChatFormatting.BLUE + " Glowstone Distillates: " + nf.format(BlazeTracker.glowstoneDistillates) + "\n" + + EnumChatFormatting.BLUE + " Magma Cream Distillates: " + nf.format(BlazeTracker.magmaCreamDistillates) + "\n" + + EnumChatFormatting.BLUE + " Nether Wart Distillates: " + nf.format(BlazeTracker.netherWartDistillates) + "\n" + + EnumChatFormatting.BLUE + " Gabagool Distillates: " + nf.format(BlazeTracker.gabagoolDistillates) + "\n" + + EnumChatFormatting.RED + " Scorched Power Crystals: " + nf.format(BlazeTracker.scorchedPowerCrystals) + "\n" + + EnumChatFormatting.RED + " Fire Aspect Books: " + nf.format(BlazeTracker.fireAspectBooks) + "\n" + + EnumChatFormatting.GOLD + " Fiery Burst Runes: " + nf.format(BlazeTracker.fieryBurstRunes) + "\n" + + EnumChatFormatting.WHITE + " Opal Gems: " + nf.format(BlazeTracker.opalGems) + "\n" + + EnumChatFormatting.RED + " Archfiend Dice: " + nf.format(BlazeTracker.archfiendDice) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Duplex Books: " + nf.format(BlazeTracker.duplexBooks) + "\n" + + EnumChatFormatting.GOLD + " High Class Archfiend Dice: " + nf.format(BlazeTracker.highClassArchfiendDice) + "\n" + + EnumChatFormatting.GOLD + " Engineering Plans: " + nf.format(BlazeTracker.engineeringPlans) + "\n" + + EnumChatFormatting.GOLD + " Subzero Inverters: " + nf.format(BlazeTracker.subzeroInverters) + "\n" + + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " -------------------")); + break; case "fishing": if (arg1.length > 1) { if (arg1[1].equalsIgnoreCase("winter")) { if (showSession) { - if (LootTracker.yetiTimeSession == -1) { + if (FishingTracker.yetiTimeSession == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.yetiTimeSession, timeNow); + timeBetween = Utils.getTimeBetween(FishingTracker.yetiTimeSession, timeNow); } - if (LootTracker.yetiSCsSession == -1) { + if (FishingTracker.yetiSCsSession == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.yetiSCsSession); + bossesBetween = nf.format(FishingTracker.yetiSCsSession); } player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.WHITE + EnumChatFormatting.BOLD + " Winter Fishing Summary (Current Session):\n" + - EnumChatFormatting.AQUA + " Frozen Steves: " + nf.format(LootTracker.frozenStevesSession) + "\n" + - EnumChatFormatting.WHITE + " Snowmans: " + nf.format(LootTracker.frostyTheSnowmansSession) + "\n" + - EnumChatFormatting.DARK_GREEN + " Grinches: " + nf.format(LootTracker.grinchesSession) + "\n" + - EnumChatFormatting.GOLD + " Yetis: " + nf.format(LootTracker.yetisSession) + "\n" + + EnumChatFormatting.AQUA + " Frozen Steves: " + nf.format(FishingTracker.frozenStevesSession) + "\n" + + EnumChatFormatting.WHITE + " Snowmans: " + nf.format(FishingTracker.frostyTheSnowmansSession) + "\n" + + EnumChatFormatting.DARK_GREEN + " Grinches: " + nf.format(FishingTracker.grinchesSession) + "\n" + + EnumChatFormatting.GOLD + " Yetis: " + nf.format(FishingTracker.yetisSession) + "\n" + EnumChatFormatting.AQUA + " Time Since Yeti: " + timeBetween + "\n" + EnumChatFormatting.AQUA + " Creatures Since Yeti: " + bossesBetween + "\n" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); return; } - if (LootTracker.yetiTime == -1) { + if (FishingTracker.yetiTime == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.yetiTime, timeNow); + timeBetween = Utils.getTimeBetween(FishingTracker.yetiTime, timeNow); } - if (LootTracker.yetiSCs == -1) { + if (FishingTracker.yetiSCs == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.yetiSCs); + bossesBetween = nf.format(FishingTracker.yetiSCs); } player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.WHITE + EnumChatFormatting.BOLD + " Winter Fishing Summary:\n" + - EnumChatFormatting.AQUA + " Frozen Steves: " + nf.format(LootTracker.frozenSteves) + "\n" + - EnumChatFormatting.WHITE + " Snowmans: " + nf.format(LootTracker.frostyTheSnowmans) + "\n" + - EnumChatFormatting.DARK_GREEN + " Grinches: " + nf.format(LootTracker.grinches) + "\n" + - EnumChatFormatting.GOLD + " Yetis: " + nf.format(LootTracker.yetis) + "\n" + + EnumChatFormatting.AQUA + " Frozen Steves: " + nf.format(FishingTracker.frozenSteves) + "\n" + + EnumChatFormatting.WHITE + " Snowmans: " + nf.format(FishingTracker.frostyTheSnowmans) + "\n" + + EnumChatFormatting.DARK_GREEN + " Grinches: " + nf.format(FishingTracker.grinches) + "\n" + + EnumChatFormatting.GOLD + " Yetis: " + nf.format(FishingTracker.yetis) + "\n" + EnumChatFormatting.AQUA + " Time Since Yeti: " + timeBetween + "\n" + EnumChatFormatting.AQUA + " Creatures Since Yeti: " + bossesBetween + "\n" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); @@ -325,112 +496,195 @@ public class LootCommand extends CommandBase { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.DARK_BLUE + EnumChatFormatting.BOLD + " Fishing Festival Summary (Current Session):\n" + - EnumChatFormatting.LIGHT_PURPLE + " Nurse Sharks: " + nf.format(LootTracker.nurseSharksSession) + "\n" + - EnumChatFormatting.BLUE + " Blue Sharks: " + nf.format(LootTracker.blueSharksSession) + "\n" + - EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(LootTracker.tigerSharksSession) + "\n" + - EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(LootTracker.greatWhiteSharksSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Nurse Sharks: " + nf.format(FishingTracker.nurseSharksSession) + "\n" + + EnumChatFormatting.BLUE + " Blue Sharks: " + nf.format(FishingTracker.blueSharksSession) + "\n" + + EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(FishingTracker.tigerSharksSession) + "\n" + + EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(FishingTracker.greatWhiteSharksSession) + "\n" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); return; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.DARK_BLUE + EnumChatFormatting.BOLD + " Fishing Festival Summary:\n" + - EnumChatFormatting.LIGHT_PURPLE + " Nurse Sharks: " + nf.format(LootTracker.nurseSharks) + "\n" + - EnumChatFormatting.BLUE + " Blue Sharks: " + nf.format(LootTracker.blueSharks) + "\n" + - EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(LootTracker.tigerSharks) + "\n" + - EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(LootTracker.greatWhiteSharks) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Nurse Sharks: " + nf.format(FishingTracker.nurseSharks) + "\n" + + EnumChatFormatting.BLUE + " Blue Sharks: " + nf.format(FishingTracker.blueSharks) + "\n" + + EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(FishingTracker.tigerSharks) + "\n" + + EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(FishingTracker.greatWhiteSharks) + "\n" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); + return; } else if (arg1[1].equalsIgnoreCase("spooky")) { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + " Spooky Fishing Summary (Current Session):\n" + - EnumChatFormatting.BLUE + " Scarecrows: " + nf.format(LootTracker.scarecrowsSession) + "\n" + - EnumChatFormatting.GRAY + " Nightmares: " + nf.format(LootTracker.nightmaresSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Werewolves: " + nf.format(LootTracker.werewolfsSession) + "\n" + - EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(LootTracker.phantomFishersSession) + "\n" + - EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(LootTracker.grimReapersSession) + "\n" + + EnumChatFormatting.BLUE + " Scarecrows: " + nf.format(FishingTracker.scarecrowsSession) + "\n" + + EnumChatFormatting.GRAY + " Nightmares: " + nf.format(FishingTracker.nightmaresSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Werewolves: " + nf.format(FishingTracker.werewolfsSession) + "\n" + + EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(FishingTracker.phantomFishersSession) + "\n" + + EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(FishingTracker.grimReapersSession) + "\n" + EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------")); return; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + " Spooky Fishing Summary:\n" + - EnumChatFormatting.BLUE + " Scarecrows: " + nf.format(LootTracker.scarecrows) + "\n" + - EnumChatFormatting.GRAY + " Nightmares: " + nf.format(LootTracker.nightmares) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Werewolves: " + nf.format(LootTracker.werewolfs) + "\n" + - EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(LootTracker.phantomFishers) + "\n" + - EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(LootTracker.grimReapers) + "\n" + + EnumChatFormatting.BLUE + " Scarecrows: " + nf.format(FishingTracker.scarecrows) + "\n" + + EnumChatFormatting.GRAY + " Nightmares: " + nf.format(FishingTracker.nightmares) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Werewolves: " + nf.format(FishingTracker.werewolfs) + "\n" + + EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(FishingTracker.phantomFishers) + "\n" + + EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(FishingTracker.grimReapers) + "\n" + + EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------")); + return; + } else if (arg1[1].equalsIgnoreCase("ch")) { + if (showSession) { + player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + " Crystal Hollows Fishing Summary:\n" + + EnumChatFormatting.BLUE + " Water Worms: " + nf.format(FishingTracker.waterWormsSession) + "\n" + + EnumChatFormatting.GREEN + " Poisoned Water Worms: " + nf.format(FishingTracker.poisonedWaterWormsSession) + "\n" + + EnumChatFormatting.RED + " Flaming Worms: " + nf.format(FishingTracker.flamingWormsSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Lava Blazes: " + nf.format(FishingTracker.lavaBlazesSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Lava Pigmen: " + nf.format(FishingTracker.lavaPigmenSession) + "\n" + + EnumChatFormatting.GOLD + " Zombie Miners: " + nf.format(FishingTracker.zombieMinersSession) + "\n" + + EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------")); + + return; + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + " Crystal Hollows Fishing Summary:\n" + + EnumChatFormatting.BLUE + " Water Worms: " + nf.format(FishingTracker.waterWorms) + "\n" + + EnumChatFormatting.GREEN + " Poisoned Water Worms: " + nf.format(FishingTracker.poisonedWaterWorms) + "\n" + + EnumChatFormatting.RED + " Flaming Worms: " + nf.format(FishingTracker.flamingWorms) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Lava Blazes: " + nf.format(FishingTracker.lavaBlazes) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Lava Pigmen: " + nf.format(FishingTracker.lavaPigmen) + "\n" + + EnumChatFormatting.GOLD + " Zombie Miners: " + nf.format(FishingTracker.zombieMiners) + "\n" + EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------")); + return; + } else if (arg1[1].equalsIgnoreCase("lava")) { + if (showSession) { + if (FishingTracker.jawbusTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(FishingTracker.jawbusTimeSession, timeNow); + } + if (FishingTracker.jawbusSCsSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(FishingTracker.jawbusSCsSession); + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Lava Fishing Summary (Current Session):\n" + + EnumChatFormatting.DARK_RED + " Magma Slugs: " + nf.format(FishingTracker.magmaSlugsSession) + "\n" + + EnumChatFormatting.RED + " Moogmas: " + nf.format(FishingTracker.moogmasSession) + "\n" + + EnumChatFormatting.RED + " Lava Leeches: " + nf.format(FishingTracker.lavaLeechesSession) + "\n" + + EnumChatFormatting.RED + " Pyroclastic Worms: " + nf.format(FishingTracker.pyroclasticWormsSession) + "\n" + + EnumChatFormatting.DARK_RED + " Lava Flames: " + nf.format(FishingTracker.lavaFlamesSession) + "\n" + + EnumChatFormatting.RED + " Fire Eels: " + nf.format(FishingTracker.fireEelsSession) + "\n" + + EnumChatFormatting.GOLD + " Tauruses: " + nf.format(FishingTracker.taurusesSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Thunders: " + nf.format(FishingTracker.thundersSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Lord Jawbuses: " + nf.format(FishingTracker.lordJawbusesSession) + "\n" + + EnumChatFormatting.AQUA + " Time Since Lord Jawbus: " + timeBetween + "\n" + + EnumChatFormatting.AQUA + " Creatures Since Lord Jawbus: " + bossesBetween + "\n" + + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); + return; + } + + if (FishingTracker.jawbusTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(FishingTracker.jawbusTime, timeNow); + } + if (FishingTracker.jawbusSCs == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(FishingTracker.jawbusSCs); + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Lava Fishing Summary:\n" + + EnumChatFormatting.DARK_RED + " Magma Slugs: " + nf.format(FishingTracker.magmaSlugs) + "\n" + + EnumChatFormatting.RED + " Moogmas: " + nf.format(FishingTracker.moogmas) + "\n" + + EnumChatFormatting.RED + " Lava Leeches: " + nf.format(FishingTracker.lavaLeeches) + "\n" + + EnumChatFormatting.RED + " Pyroclastic Worms: " + nf.format(FishingTracker.pyroclasticWorms) + "\n" + + EnumChatFormatting.DARK_RED + " Lava Flames: " + nf.format(FishingTracker.lavaFlames) + "\n" + + EnumChatFormatting.RED + " Fire Eels: " + nf.format(FishingTracker.fireEels) + "\n" + + EnumChatFormatting.GOLD + " Tauruses: " + nf.format(FishingTracker.tauruses) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Thunders: " + nf.format(FishingTracker.thunders) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Lord Jawbuses: " + nf.format(FishingTracker.lordJawbuses) + "\n" + + EnumChatFormatting.AQUA + " Time Since Lord Jawbus: " + timeBetween + "\n" + + EnumChatFormatting.AQUA + " Creatures Since Lord Jawbus: " + bossesBetween + "\n" + + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); + return; } } if (showSession) { - if (LootTracker.empTimeSession == -1) { + if (FishingTracker.empTimeSession == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.empTimeSession, timeNow); + timeBetween = Utils.getTimeBetween(FishingTracker.empTimeSession, timeNow); } - if (LootTracker.empSCsSession == -1) { + if (FishingTracker.empSCsSession == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.empSCsSession); + bossesBetween = nf.format(FishingTracker.empSCsSession); } player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " Fishing Summary (Current Session):\n" + - EnumChatFormatting.AQUA + " Sea Creatures Caught: " + nf.format(LootTracker.seaCreaturesSession) + "\n" + - EnumChatFormatting.GOLD + " Good Catches: " + nf.format(LootTracker.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Great Catches: " + nf.format(LootTracker.greatCatchesSession) + "\n\n" + - EnumChatFormatting.GRAY + " Squids: " + nf.format(LootTracker.squidsSession) + "\n" + - EnumChatFormatting.GREEN + " Sea Walkers: " + nf.format(LootTracker.seaWalkersSession) + "\n" + - EnumChatFormatting.DARK_GRAY + " Night Squids: " + nf.format(LootTracker.nightSquidsSession) + "\n" + - EnumChatFormatting.DARK_AQUA + " Sea Guardians: " + nf.format(LootTracker.seaGuardiansSession) + "\n" + - EnumChatFormatting.BLUE + " Sea Witches: " + nf.format(LootTracker.seaWitchesSession) + "\n" + - EnumChatFormatting.GREEN + " Sea Archers: " + nf.format(LootTracker.seaArchersSession) + "\n" + - EnumChatFormatting.GREEN + " Monster of the Deeps: " + nf.format(LootTracker.monsterOfTheDeepsSession) + "\n" + - EnumChatFormatting.YELLOW + " Catfishes: " + nf.format(LootTracker.catfishesSession) + "\n" + - EnumChatFormatting.GOLD + " Carrot Kings: " + nf.format(LootTracker.carrotKingsSession) + "\n" + - EnumChatFormatting.GRAY + " Sea Leeches: " + nf.format(LootTracker.seaLeechesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Guardian Defenders: " + nf.format(LootTracker.guardianDefendersSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Deep Sea Protectors: " + nf.format(LootTracker.deepSeaProtectorsSession) + "\n" + - EnumChatFormatting.GOLD + " Hydras: " + nf.format(LootTracker.hydrasSession) + "\n" + - EnumChatFormatting.GOLD + " Sea Emperors: " + nf.format(LootTracker.seaEmperorsSession) + "\n" + + EnumChatFormatting.AQUA + " Sea Creatures Caught: " + nf.format(FishingTracker.seaCreaturesSession) + "\n" + + EnumChatFormatting.GOLD + " Good Catches: " + nf.format(FishingTracker.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Great Catches: " + nf.format(FishingTracker.greatCatchesSession) + "\n\n" + + EnumChatFormatting.GRAY + " Squids: " + nf.format(FishingTracker.squidsSession) + "\n" + + EnumChatFormatting.GREEN + " Sea Walkers: " + nf.format(FishingTracker.seaWalkersSession) + "\n" + + EnumChatFormatting.DARK_GRAY + " Night Squids: " + nf.format(FishingTracker.nightSquidsSession) + "\n" + + EnumChatFormatting.DARK_AQUA + " Sea Guardians: " + nf.format(FishingTracker.seaGuardiansSession) + "\n" + + EnumChatFormatting.BLUE + " Sea Witches: " + nf.format(FishingTracker.seaWitchesSession) + "\n" + + EnumChatFormatting.GREEN + " Sea Archers: " + nf.format(FishingTracker.seaArchersSession) + "\n" + + EnumChatFormatting.GREEN + " Monster of the Deeps: " + nf.format(FishingTracker.monsterOfTheDeepsSession) + "\n" + + EnumChatFormatting.YELLOW + " Catfishes: " + nf.format(FishingTracker.catfishesSession) + "\n" + + EnumChatFormatting.GOLD + " Carrot Kings: " + nf.format(FishingTracker.carrotKingsSession) + "\n" + + EnumChatFormatting.GRAY + " Sea Leeches: " + nf.format(FishingTracker.seaLeechesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Guardian Defenders: " + nf.format(FishingTracker.guardianDefendersSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Deep Sea Protectors: " + nf.format(FishingTracker.deepSeaProtectorsSession) + "\n" + + EnumChatFormatting.GOLD + " Hydras: " + nf.format(FishingTracker.hydrasSession) + "\n" + + EnumChatFormatting.GOLD + " Sea Emperors: " + nf.format(FishingTracker.seaEmperorsSession) + "\n" + EnumChatFormatting.AQUA + " Time Since Sea Emperor: " + timeBetween + "\n" + EnumChatFormatting.AQUA + " Sea Creatures Since Sea Emperor: " + bossesBetween + "\n" + EnumChatFormatting.DARK_AQUA + EnumChatFormatting.BOLD + " -------------------")); return; } - if (LootTracker.empTime == -1) { + if (FishingTracker.empTime == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.empTime, timeNow); + timeBetween = Utils.getTimeBetween(FishingTracker.empTime, timeNow); } - if (LootTracker.empSCs == -1) { + if (FishingTracker.empSCs == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.empSCs); + bossesBetween = nf.format(FishingTracker.empSCs); } player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " Fishing Summary:\n" + - EnumChatFormatting.AQUA + " Sea Creatures Caught: " + nf.format(LootTracker.seaCreatures) + "\n" + - EnumChatFormatting.GOLD + " Good Catches: " + nf.format(LootTracker.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Great Catches: " + nf.format(LootTracker.greatCatches) + "\n\n" + - EnumChatFormatting.GRAY + " Squids: " + nf.format(LootTracker.squids) + "\n" + - EnumChatFormatting.GREEN + " Sea Walkers: " + nf.format(LootTracker.seaWalkers) + "\n" + - EnumChatFormatting.DARK_GRAY + " Night Squids: " + nf.format(LootTracker.nightSquids) + "\n" + - EnumChatFormatting.DARK_AQUA + " Sea Guardians: " + nf.format(LootTracker.seaGuardians) + "\n" + - EnumChatFormatting.BLUE + " Sea Witches: " + nf.format(LootTracker.seaWitches) + "\n" + - EnumChatFormatting.GREEN + " Sea Archers: " + nf.format(LootTracker.seaArchers) + "\n" + - EnumChatFormatting.GREEN + " Monster of the Deeps: " + nf.format(LootTracker.monsterOfTheDeeps) + "\n" + - EnumChatFormatting.YELLOW + " Catfishes: " + nf.format(LootTracker.catfishes) + "\n" + - EnumChatFormatting.GOLD + " Carrot Kings: " + nf.format(LootTracker.carrotKings) + "\n" + - EnumChatFormatting.GRAY + " Sea Leeches: " + nf.format(LootTracker.seaLeeches) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Guardian Defenders: " + nf.format(LootTracker.guardianDefenders) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Deep Sea Protectors: " + nf.format(LootTracker.deepSeaProtectors) + "\n" + - EnumChatFormatting.GOLD + " Hydras: " + nf.format(LootTracker.hydras) + "\n" + - EnumChatFormatting.GOLD + " Sea Emperors: " + nf.format(LootTracker.seaEmperors) + "\n" + + EnumChatFormatting.AQUA + " Sea Creatures Caught: " + nf.format(FishingTracker.seaCreatures) + "\n" + + EnumChatFormatting.GOLD + " Good Catches: " + nf.format(FishingTracker.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Great Catches: " + nf.format(FishingTracker.greatCatches) + "\n\n" + + EnumChatFormatting.GRAY + " Squids: " + nf.format(FishingTracker.squids) + "\n" + + EnumChatFormatting.GREEN + " Sea Walkers: " + nf.format(FishingTracker.seaWalkers) + "\n" + + EnumChatFormatting.DARK_GRAY + " Night Squids: " + nf.format(FishingTracker.nightSquids) + "\n" + + EnumChatFormatting.DARK_AQUA + " Sea Guardians: " + nf.format(FishingTracker.seaGuardians) + "\n" + + EnumChatFormatting.BLUE + " Sea Witches: " + nf.format(FishingTracker.seaWitches) + "\n" + + EnumChatFormatting.GREEN + " Sea Archers: " + nf.format(FishingTracker.seaArchers) + "\n" + + EnumChatFormatting.GREEN + " Monster of the Deeps: " + nf.format(FishingTracker.monsterOfTheDeeps) + "\n" + + EnumChatFormatting.YELLOW + " Catfishes: " + nf.format(FishingTracker.catfishes) + "\n" + + EnumChatFormatting.GOLD + " Carrot Kings: " + nf.format(FishingTracker.carrotKings) + "\n" + + EnumChatFormatting.GRAY + " Sea Leeches: " + nf.format(FishingTracker.seaLeeches) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Guardian Defenders: " + nf.format(FishingTracker.guardianDefenders) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Deep Sea Protectors: " + nf.format(FishingTracker.deepSeaProtectors) + "\n" + + EnumChatFormatting.GOLD + " Hydras: " + nf.format(FishingTracker.hydras) + "\n" + + EnumChatFormatting.GOLD + " Sea Emperors: " + nf.format(FishingTracker.seaEmperors) + "\n" + EnumChatFormatting.AQUA + " Time Since Sea Emperor: " + timeBetween + "\n" + EnumChatFormatting.AQUA + " Sea Creatures Since Sea Emperor: " + bossesBetween + "\n" + EnumChatFormatting.DARK_AQUA + EnumChatFormatting.BOLD + " -------------------")); @@ -440,31 +694,31 @@ public class LootCommand extends CommandBase { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.YELLOW + EnumChatFormatting.BOLD + " Mythological Event Summary (Current Session):\n" + - EnumChatFormatting.YELLOW + " Coins: " + Utils.getMoneySpent(LootTracker.mythCoinsSession) + "\n" + - EnumChatFormatting.WHITE + " Griffin Feathers: " + nf.format(LootTracker.griffinFeathersSession) + "\n" + - EnumChatFormatting.GOLD + " Crown of Greeds: " + nf.format(LootTracker.crownOfGreedsSession) + "\n" + - EnumChatFormatting.AQUA + " Washed-up Souvenirs: " + nf.format(LootTracker.washedUpSouvenirsSession) + "\n" + - EnumChatFormatting.RED + " Minos Hunters: " + nf.format(LootTracker.minosHuntersSession) + "\n" + - EnumChatFormatting.GRAY + " Siamese Lynxes: " + nf.format(LootTracker.siameseLynxesSession) + "\n" + - EnumChatFormatting.RED + " Minotaurs: " + nf.format(LootTracker.minotaursSession) + "\n" + - EnumChatFormatting.WHITE + " Gaia Constructs: " + nf.format(LootTracker.gaiaConstructsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Minos Champions: " + nf.format(LootTracker.minosChampionsSession) + "\n" + - EnumChatFormatting.GOLD + " Minos Inquisitors: " + nf.format(LootTracker.minosInquisitorsSession) + "\n" + + EnumChatFormatting.YELLOW + " Coins: " + Utils.getMoneySpent(MythologicalTracker.mythCoinsSession) + "\n" + + EnumChatFormatting.WHITE + " Griffin Feathers: " + nf.format(MythologicalTracker.griffinFeathersSession) + "\n" + + EnumChatFormatting.GOLD + " Crown of Greeds: " + nf.format(MythologicalTracker.crownOfGreedsSession) + "\n" + + EnumChatFormatting.AQUA + " Washed-up Souvenirs: " + nf.format(MythologicalTracker.washedUpSouvenirsSession) + "\n" + + EnumChatFormatting.RED + " Minos Hunters: " + nf.format(MythologicalTracker.minosHuntersSession) + "\n" + + EnumChatFormatting.GRAY + " Siamese Lynxes: " + nf.format(MythologicalTracker.siameseLynxesSession) + "\n" + + EnumChatFormatting.RED + " Minotaurs: " + nf.format(MythologicalTracker.minotaursSession) + "\n" + + EnumChatFormatting.WHITE + " Gaia Constructs: " + nf.format(MythologicalTracker.gaiaConstructsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Minos Champions: " + nf.format(MythologicalTracker.minosChampionsSession) + "\n" + + EnumChatFormatting.GOLD + " Minos Inquisitors: " + nf.format(MythologicalTracker.minosInquisitorsSession) + "\n" + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + "-------------------")); return; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.YELLOW + EnumChatFormatting.BOLD + " Mythological Event Summary:\n" + - EnumChatFormatting.YELLOW + " Coins: " + Utils.getMoneySpent(LootTracker.mythCoins) + "\n" + - EnumChatFormatting.WHITE + " Griffin Feathers: " + nf.format(LootTracker.griffinFeathers) + "\n" + - EnumChatFormatting.GOLD + " Crown of Greeds: " + nf.format(LootTracker.crownOfGreeds) + "\n" + - EnumChatFormatting.AQUA + " Washed-up Souvenirs: " + nf.format(LootTracker.washedUpSouvenirs) + "\n" + - EnumChatFormatting.RED + " Minos Hunters: " + nf.format(LootTracker.minosHunters) + "\n" + - EnumChatFormatting.GRAY + " Siamese Lynxes: " + nf.format(LootTracker.siameseLynxes) + "\n" + - EnumChatFormatting.RED + " Minotaurs: " + nf.format(LootTracker.minotaurs) + "\n" + - EnumChatFormatting.WHITE + " Gaia Constructs: " + nf.format(LootTracker.gaiaConstructs) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Minos Champions: " + nf.format(LootTracker.minosChampions) + "\n" + - EnumChatFormatting.GOLD + " Minos Inquisitors: " + nf.format(LootTracker.minosInquisitors) + "\n" + + EnumChatFormatting.YELLOW + " Coins: " + Utils.getMoneySpent(MythologicalTracker.mythCoins) + "\n" + + EnumChatFormatting.WHITE + " Griffin Feathers: " + nf.format(MythologicalTracker.griffinFeathers) + "\n" + + EnumChatFormatting.GOLD + " Crown of Greeds: " + nf.format(MythologicalTracker.crownOfGreeds) + "\n" + + EnumChatFormatting.AQUA + " Washed-up Souvenirs: " + nf.format(MythologicalTracker.washedUpSouvenirs) + "\n" + + EnumChatFormatting.RED + " Minos Hunters: " + nf.format(MythologicalTracker.minosHunters) + "\n" + + EnumChatFormatting.GRAY + " Siamese Lynxes: " + nf.format(MythologicalTracker.siameseLynxes) + "\n" + + EnumChatFormatting.RED + " Minotaurs: " + nf.format(MythologicalTracker.minotaurs) + "\n" + + EnumChatFormatting.WHITE + " Gaia Constructs: " + nf.format(MythologicalTracker.gaiaConstructs) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Minos Champions: " + nf.format(MythologicalTracker.minosChampions) + "\n" + + EnumChatFormatting.GOLD + " Minos Inquisitors: " + nf.format(MythologicalTracker.minosInquisitors) + "\n" + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + "-------------------")); break; case "catacombs": @@ -478,21 +732,23 @@ public class LootCommand extends CommandBase { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F1 Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + " Bonzo's Staffs: " + nf.format(LootTracker.bonzoStaffsSession) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f1CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f1TimeSpentSession) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f1SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + " Bonzo's Staffs: " + nf.format(CatacombsTracker.bonzoStaffsSession) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f1CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f1TimeSpentSession) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); return; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F1 Summary:\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + " Bonzo's Staffs: " + nf.format(LootTracker.bonzoStaffs) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f1CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f1TimeSpent) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f1SPlus) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + " Bonzo's Staffs: " + nf.format(CatacombsTracker.bonzoStaffs) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f1CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f1TimeSpent) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); break; case "f2": @@ -500,23 +756,25 @@ public class LootCommand extends CommandBase { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F2 Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + " Scarf's Studies: " + nf.format(LootTracker.scarfStudiesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Adaptive Blades: " + nf.format(LootTracker.adaptiveSwordsSession) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f2CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f2TimeSpentSession) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f2SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + " Scarf's Studies: " + nf.format(CatacombsTracker.scarfStudiesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Adaptive Blades: " + nf.format(CatacombsTracker.adaptiveSwordsSession) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f2CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f2TimeSpentSession) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); return; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F2 Summary:\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + " Scarf's Studies: " + nf.format(LootTracker.scarfStudies) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Adaptive Blades: " + nf.format(LootTracker.adaptiveSwords) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f2CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f2TimeSpent) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f2SPlus) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + " Scarf's Studies: " + nf.format(CatacombsTracker.scarfStudies) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Adaptive Blades: " + nf.format(CatacombsTracker.adaptiveSwords) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f2CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f2TimeSpent) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); break; case "f3": @@ -524,27 +782,29 @@ public class LootCommand extends CommandBase { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F3 Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Adaptive Helmets: " + nf.format(LootTracker.adaptiveHelmsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Adaptive Chestplates: " + nf.format(LootTracker.adaptiveChestsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Adaptive Leggings: " + nf.format(LootTracker.adaptiveLegsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Adaptive Boots: " + nf.format(LootTracker.adaptiveBootsSession) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f3CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f3TimeSpentSession) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f3SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Adaptive Helmets: " + nf.format(CatacombsTracker.adaptiveHelmsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Adaptive Chestplates: " + nf.format(CatacombsTracker.adaptiveChestsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Adaptive Leggings: " + nf.format(CatacombsTracker.adaptiveLegsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Adaptive Boots: " + nf.format(CatacombsTracker.adaptiveBootsSession) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f3CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f3TimeSpentSession) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); return; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F3 Summary:\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Adaptive Helmets: " + nf.format(LootTracker.adaptiveHelms) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Adaptive Chestplates: " + nf.format(LootTracker.adaptiveChests) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Adaptive Leggings: " + nf.format(LootTracker.adaptiveLegs) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Adaptive Boots: " + nf.format(LootTracker.adaptiveBoots) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f3CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f3TimeSpent) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f3SPlus) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Adaptive Helmets: " + nf.format(CatacombsTracker.adaptiveHelms) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Adaptive Chestplates: " + nf.format(CatacombsTracker.adaptiveChests) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Adaptive Leggings: " + nf.format(CatacombsTracker.adaptiveLegs) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Adaptive Boots: " + nf.format(CatacombsTracker.adaptiveBoots) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f3CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f3TimeSpent) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); break; case "f4": @@ -552,33 +812,35 @@ public class LootCommand extends CommandBase { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F4 Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Spirit Wings: " + nf.format(LootTracker.spiritWingsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Spirit Bones: " + nf.format(LootTracker.spiritBonesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Spirit Boots: " + nf.format(LootTracker.spiritBootsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Spirit Swords: " + nf.format(LootTracker.spiritSwordsSession) + "\n" + - EnumChatFormatting.GOLD + " Spirit Bows: " + nf.format(LootTracker.spiritBowsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Epic Spirit Pets: " + nf.format(LootTracker.epicSpiritPetsSession) + "\n" + - EnumChatFormatting.GOLD + " Leg Spirit Pets: " + nf.format(LootTracker.legSpiritPetsSession) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f4CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f4TimeSpentSession) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f4SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Spirit Wings: " + nf.format(CatacombsTracker.spiritWingsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Spirit Bones: " + nf.format(CatacombsTracker.spiritBonesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Spirit Boots: " + nf.format(CatacombsTracker.spiritBootsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Spirit Swords: " + nf.format(CatacombsTracker.spiritSwordsSession) + "\n" + + EnumChatFormatting.GOLD + " Spirit Bows: " + nf.format(CatacombsTracker.spiritBowsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Epic Spirit Pets: " + nf.format(CatacombsTracker.epicSpiritPetsSession) + "\n" + + EnumChatFormatting.GOLD + " Leg Spirit Pets: " + nf.format(CatacombsTracker.legSpiritPetsSession) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f4CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f4TimeSpentSession) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); return; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F4 Summary:\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Spirit Wings: " + nf.format(LootTracker.spiritWings) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Spirit Bones: " + nf.format(LootTracker.spiritBones) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Spirit Boots: " + nf.format(LootTracker.spiritBoots) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Spirit Swords: " + nf.format(LootTracker.spiritSwords) + "\n" + - EnumChatFormatting.GOLD + " Spirit Bows: " + nf.format(LootTracker.spiritBows) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Epic Spirit Pets: " + nf.format(LootTracker.epicSpiritPets) + "\n" + - EnumChatFormatting.GOLD + " Leg Spirit Pets: " + nf.format(LootTracker.legSpiritPets) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f4CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f4TimeSpent) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f4SPlus) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Spirit Wings: " + nf.format(CatacombsTracker.spiritWings) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Spirit Bones: " + nf.format(CatacombsTracker.spiritBones) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Spirit Boots: " + nf.format(CatacombsTracker.spiritBoots) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Spirit Swords: " + nf.format(CatacombsTracker.spiritSwords) + "\n" + + EnumChatFormatting.GOLD + " Spirit Bows: " + nf.format(CatacombsTracker.spiritBows) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Epic Spirit Pets: " + nf.format(CatacombsTracker.epicSpiritPets) + "\n" + + EnumChatFormatting.GOLD + " Leg Spirit Pets: " + nf.format(CatacombsTracker.legSpiritPets) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f4CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f4TimeSpent) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); break; case "f5": @@ -586,35 +848,37 @@ public class LootCommand extends CommandBase { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F5 Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.BLUE + " Warped Stones: " + nf.format(LootTracker.warpedStonesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Helmets: " + nf.format(LootTracker.shadowAssHelmsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Chests: " + nf.format(LootTracker.shadowAssChestsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Legs: " + nf.format(LootTracker.shadowAssLegsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Boots: " + nf.format(LootTracker.shadowAssBootsSession) + "\n" + - EnumChatFormatting.GOLD + " Last Breaths: " + nf.format(LootTracker.lastBreathsSession) + "\n" + - EnumChatFormatting.GOLD + " Livid Daggers: " + nf.format(LootTracker.lividDaggersSession) + "\n" + - EnumChatFormatting.GOLD + " Shadow Furys: " + nf.format(LootTracker.shadowFurysSession) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f5CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f5TimeSpentSession) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f5SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.BLUE + " Warped Stones: " + nf.format(CatacombsTracker.warpedStonesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Helmets: " + nf.format(CatacombsTracker.shadowAssHelmsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Chests: " + nf.format(CatacombsTracker.shadowAssChestsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Legs: " + nf.format(CatacombsTracker.shadowAssLegsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Boots: " + nf.format(CatacombsTracker.shadowAssBootsSession) + "\n" + + EnumChatFormatting.GOLD + " Last Breaths: " + nf.format(CatacombsTracker.lastBreathsSession) + "\n" + + EnumChatFormatting.GOLD + " Livid Daggers: " + nf.format(CatacombsTracker.lividDaggersSession) + "\n" + + EnumChatFormatting.GOLD + " Shadow Furys: " + nf.format(CatacombsTracker.shadowFurysSession) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f5CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f5TimeSpentSession) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); return; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F5 Summary:\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + " Warped Stones: " + nf.format(LootTracker.warpedStones) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Helmets: " + nf.format(LootTracker.shadowAssHelms) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Chests: " + nf.format(LootTracker.shadowAssChests) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Legs: " + nf.format(LootTracker.shadowAssLegs) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Boots: " + nf.format(LootTracker.shadowAssBoots) + "\n" + - EnumChatFormatting.GOLD + " Last Breaths: " + nf.format(LootTracker.lastBreaths) + "\n" + - EnumChatFormatting.GOLD + " Livid Daggers: " + nf.format(LootTracker.lividDaggers) + "\n" + - EnumChatFormatting.GOLD + " Shadow Furys: " + nf.format(LootTracker.shadowFurys) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f5CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f5TimeSpent) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f5SPlus) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + " Warped Stones: " + nf.format(CatacombsTracker.warpedStones) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Helmets: " + nf.format(CatacombsTracker.shadowAssHelms) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Chests: " + nf.format(CatacombsTracker.shadowAssChests) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Legs: " + nf.format(CatacombsTracker.shadowAssLegs) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Boots: " + nf.format(CatacombsTracker.shadowAssBoots) + "\n" + + EnumChatFormatting.GOLD + " Last Breaths: " + nf.format(CatacombsTracker.lastBreaths) + "\n" + + EnumChatFormatting.GOLD + " Livid Daggers: " + nf.format(CatacombsTracker.lividDaggers) + "\n" + + EnumChatFormatting.GOLD + " Shadow Furys: " + nf.format(CatacombsTracker.shadowFurys) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f5CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f5TimeSpent) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); break; case "f6": @@ -622,35 +886,39 @@ public class LootCommand extends CommandBase { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F6 Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + " Ancient Roses: " + nf.format(LootTracker.ancientRosesSession) + "\n" + - EnumChatFormatting.GOLD + " Precursor Eyes: " + nf.format(LootTracker.precursorEyesSession) + "\n" + - EnumChatFormatting.GOLD + " Giant's Swords: " + nf.format(LootTracker.giantsSwordsSession) + "\n" + - EnumChatFormatting.GOLD + " Necro Lord Helmets: " + nf.format(LootTracker.necroLordHelmsSession) + "\n" + - EnumChatFormatting.GOLD + " Necro Lord Chestplates: " + nf.format(LootTracker.necroLordChestsSession) + "\n" + - EnumChatFormatting.GOLD + " Necro Lord Leggings: " + nf.format(LootTracker.necroLordLegsSession) + "\n" + - EnumChatFormatting.GOLD + " Necro Lord Boots: " + nf.format(LootTracker.necroLordBootsSession) + "\n" + - EnumChatFormatting.GOLD + " Necro Swords: " + nf.format(LootTracker.necroSwordsSession) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f6CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f6TimeSpentSession) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f6SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + " Ancient Roses: " + nf.format(CatacombsTracker.ancientRosesSession) + "\n" + + EnumChatFormatting.GOLD + " Precursor Eyes: " + nf.format(CatacombsTracker.precursorEyesSession) + "\n" + + EnumChatFormatting.GOLD + " Giant's Swords: " + nf.format(CatacombsTracker.giantsSwordsSession) + "\n" + + EnumChatFormatting.GOLD + " Necro Lord Helmets: " + nf.format(CatacombsTracker.necroLordHelmsSession) + "\n" + + EnumChatFormatting.GOLD + " Necro Lord Chestplates: " + nf.format(CatacombsTracker.necroLordChestsSession) + "\n" + + EnumChatFormatting.GOLD + " Necro Lord Leggings: " + nf.format(CatacombsTracker.necroLordLegsSession) + "\n" + + EnumChatFormatting.GOLD + " Necro Lord Boots: " + nf.format(CatacombsTracker.necroLordBootsSession) + "\n" + + EnumChatFormatting.GOLD + " Necro Swords: " + nf.format(CatacombsTracker.necroSwordsSession) + "\n" + + EnumChatFormatting.WHITE + " Rerolls: " + nf.format(CatacombsTracker.f6RerollsSession) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f6CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f6TimeSpentSession) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); return; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F6 Summary:\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + " Ancient Roses: " + nf.format(LootTracker.ancientRoses) + "\n" + - EnumChatFormatting.GOLD + " Precursor Eyes: " + nf.format(LootTracker.precursorEyes) + "\n" + - EnumChatFormatting.GOLD + " Giant's Swords: " + nf.format(LootTracker.giantsSwords) + "\n" + - EnumChatFormatting.GOLD + " Necro Lord Helmets: " + nf.format(LootTracker.necroLordHelms) + "\n" + - EnumChatFormatting.GOLD + " Necro Lord Chestplates: " + nf.format(LootTracker.necroLordChests) + "\n" + - EnumChatFormatting.GOLD + " Necro Lord Leggings: " + nf.format(LootTracker.necroLordLegs) + "\n" + - EnumChatFormatting.GOLD + " Necro Lord Boots: " + nf.format(LootTracker.necroLordBoots) + "\n" + - EnumChatFormatting.GOLD + " Necro Swords: " + nf.format(LootTracker.necroSwords) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f6CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f6TimeSpent) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f6SPlus) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + " Ancient Roses: " + nf.format(CatacombsTracker.ancientRoses) + "\n" + + EnumChatFormatting.GOLD + " Precursor Eyes: " + nf.format(CatacombsTracker.precursorEyes) + "\n" + + EnumChatFormatting.GOLD + " Giant's Swords: " + nf.format(CatacombsTracker.giantsSwords) + "\n" + + EnumChatFormatting.GOLD + " Necro Lord Helmets: " + nf.format(CatacombsTracker.necroLordHelms) + "\n" + + EnumChatFormatting.GOLD + " Necro Lord Chestplates: " + nf.format(CatacombsTracker.necroLordChests) + "\n" + + EnumChatFormatting.GOLD + " Necro Lord Leggings: " + nf.format(CatacombsTracker.necroLordLegs) + "\n" + + EnumChatFormatting.GOLD + " Necro Lord Boots: " + nf.format(CatacombsTracker.necroLordBoots) + "\n" + + EnumChatFormatting.GOLD + " Necro Swords: " + nf.format(CatacombsTracker.necroSwords) + "\n" + + EnumChatFormatting.WHITE + " Rerolls: " + nf.format(CatacombsTracker.f6Rerolls) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f6CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f6TimeSpent) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); break; case "f7": @@ -658,45 +926,113 @@ public class LootCommand extends CommandBase { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F7 Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Wither Bloods: " + nf.format(LootTracker.witherBloodsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Wither Cloaks: " + nf.format(LootTracker.witherCloaksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Implosions: " + nf.format(LootTracker.implosionsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Wither Shields: " + nf.format(LootTracker.witherShieldsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Shadow Warps: " + nf.format(LootTracker.shadowWarpsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Necron's Handles: " + nf.format(LootTracker.necronsHandlesSession) + "\n" + - EnumChatFormatting.GOLD + " Auto Recombobulator: " + nf.format(LootTracker.autoRecombsSession) + "\n" + - EnumChatFormatting.GOLD + " Wither Helmets: " + nf.format(LootTracker.witherHelmsSession) + "\n" + - EnumChatFormatting.GOLD + " Wither Chesplates: " + nf.format(LootTracker.witherChestsSession) + "\n" + - EnumChatFormatting.GOLD + " Wither Leggings: " + nf.format(LootTracker.witherLegsSession) + "\n" + - EnumChatFormatting.GOLD + " Wither Boots: " + nf.format(LootTracker.witherBootsSession) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f7CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f7TimeSpentSession) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f7SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Bloods: " + nf.format(CatacombsTracker.witherBloodsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Cloaks: " + nf.format(CatacombsTracker.witherCloaksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Implosions: " + nf.format(CatacombsTracker.implosionsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Shields: " + nf.format(CatacombsTracker.witherShieldsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Warps: " + nf.format(CatacombsTracker.shadowWarpsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Necron's Handles: " + nf.format(CatacombsTracker.necronsHandlesSession) + "\n" + + EnumChatFormatting.GOLD + " Auto Recombobulator: " + nf.format(CatacombsTracker.autoRecombsSession) + "\n" + + EnumChatFormatting.GOLD + " Wither Helmets: " + nf.format(CatacombsTracker.witherHelmsSession) + "\n" + + EnumChatFormatting.GOLD + " Wither Chesplates: " + nf.format(CatacombsTracker.witherChestsSession) + "\n" + + EnumChatFormatting.GOLD + " Wither Leggings: " + nf.format(CatacombsTracker.witherLegsSession) + "\n" + + EnumChatFormatting.GOLD + " Wither Boots: " + nf.format(CatacombsTracker.witherBootsSession) + "\n" + + EnumChatFormatting.WHITE + " Rerolls: " + nf.format(CatacombsTracker.f7RerollsSession) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f7CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f7TimeSpentSession) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); return; } player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F7 Summary:\n" + - EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Wither Bloods: " + nf.format(LootTracker.witherBloods) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Wither Cloaks: " + nf.format(LootTracker.witherCloaks) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Implosions: " + nf.format(LootTracker.implosions) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Wither Shields: " + nf.format(LootTracker.witherShields) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Shadow Warps: " + nf.format(LootTracker.shadowWarps) + "\n" + - EnumChatFormatting.DARK_PURPLE + " Necron's Handles: " + nf.format(LootTracker.necronsHandles) + "\n" + - EnumChatFormatting.GOLD + " Auto Recombobulator: " + nf.format(LootTracker.autoRecombs) + "\n" + - EnumChatFormatting.GOLD + " Wither Helmets: " + nf.format(LootTracker.witherHelms) + "\n" + - EnumChatFormatting.GOLD + " Wither Chesplates: " + nf.format(LootTracker.witherChests) + "\n" + - EnumChatFormatting.GOLD + " Wither Leggings: " + nf.format(LootTracker.witherLegs) + "\n" + - EnumChatFormatting.GOLD + " Wither Boots: " + nf.format(LootTracker.witherBoots) + "\n" + - EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(LootTracker.f7CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, LootTracker.f7TimeSpent) + "\n" + + EnumChatFormatting.GOLD + " S+ Runs: " + nf.format(CatacombsTracker.f7SPlus) + "\n" + + EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Bloods: " + nf.format(CatacombsTracker.witherBloods) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Cloaks: " + nf.format(CatacombsTracker.witherCloaks) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Implosions: " + nf.format(CatacombsTracker.implosions) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Shields: " + nf.format(CatacombsTracker.witherShields) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Warps: " + nf.format(CatacombsTracker.shadowWarps) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Necron's Handles: " + nf.format(CatacombsTracker.necronsHandles) + "\n" + + EnumChatFormatting.GOLD + " Auto Recombobulator: " + nf.format(CatacombsTracker.autoRecombs) + "\n" + + EnumChatFormatting.GOLD + " Wither Helmets: " + nf.format(CatacombsTracker.witherHelms) + "\n" + + EnumChatFormatting.GOLD + " Wither Chesplates: " + nf.format(CatacombsTracker.witherChests) + "\n" + + EnumChatFormatting.GOLD + " Wither Leggings: " + nf.format(CatacombsTracker.witherLegs) + "\n" + + EnumChatFormatting.GOLD + " Wither Boots: " + nf.format(CatacombsTracker.witherBoots) + "\n" + + EnumChatFormatting.WHITE + " Rerolls: " + nf.format(CatacombsTracker.f7Rerolls) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.f7CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.f7TimeSpent) + "\n" + + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); + break; + case "mm": + case "master": + if (showSession) { + player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs MM Summary (Current Session):\n" + + EnumChatFormatting.GOLD + " Master One S Runs: " + nf.format(CatacombsTracker.m1SSession) + "\n" + + EnumChatFormatting.GOLD + " Master One S+ Runs: " + nf.format(CatacombsTracker.m1SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Two S Runs: " + nf.format(CatacombsTracker.m2SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Two S+ Runs: " + nf.format(CatacombsTracker.m2SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Three S Runs: " + nf.format(CatacombsTracker.m3SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Three S+ Runs: " + nf.format(CatacombsTracker.m3SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Four S Runs: " + nf.format(CatacombsTracker.m4SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Four S+ Runs: " + nf.format(CatacombsTracker.m4SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Five S Runs: " + nf.format(CatacombsTracker.m5SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Five S+ Runs: " + nf.format(CatacombsTracker.m5SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Six S Runs: " + nf.format(CatacombsTracker.m6SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Six S+ Runs: " + nf.format(CatacombsTracker.m6SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Seven S Runs: " + nf.format(CatacombsTracker.m7SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Seven S+ Runs: " + nf.format(CatacombsTracker.m7SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Recombobulators: " + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " 1st Master Stars: " + nf.format(CatacombsTracker.firstStarsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " 2nd Master Stars: " + nf.format(CatacombsTracker.secondStarsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " 3rd Master Stars: " + nf.format(CatacombsTracker.thirdStarsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " 4th Master Stars: " + nf.format(CatacombsTracker.fourthStarsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " 5th Master Stars: " + nf.format(CatacombsTracker.fifthStarsSession) + "\n" + + EnumChatFormatting.GOLD + " Necron Dyes: " + nf.format(CatacombsTracker.necronDyesSession) + "\n" + + EnumChatFormatting.GOLD + " Dark Claymores: " + nf.format(CatacombsTracker.darkClaymoresSession) + "\n" + + EnumChatFormatting.WHITE + " Rerolls: " + nf.format(CatacombsTracker.masterRerollsSession) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.masterCoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.masterTimeSpentSession) + "\n" + + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); + return; + } + player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs MM Summary:\n" + + EnumChatFormatting.GOLD + " Master One S Runs: " + nf.format(CatacombsTracker.m1S) + "\n" + + EnumChatFormatting.GOLD + " Master One S+ Runs: " + nf.format(CatacombsTracker.m1SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Two S Runs: " + nf.format(CatacombsTracker.m2S) + "\n" + + EnumChatFormatting.GOLD + " Master Two S+ Runs: " + nf.format(CatacombsTracker.m2SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Three S Runs: " + nf.format(CatacombsTracker.m3S) + "\n" + + EnumChatFormatting.GOLD + " Master Three S+ Runs: " + nf.format(CatacombsTracker.m3SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Four S Runs: " + nf.format(CatacombsTracker.m4S) + "\n" + + EnumChatFormatting.GOLD + " Master Four S+ Runs: " + nf.format(CatacombsTracker.m4SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Five S Runs: " + nf.format(CatacombsTracker.m5S) + "\n" + + EnumChatFormatting.GOLD + " Master Five S+ Runs: " + nf.format(CatacombsTracker.m5SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Six S Runs: " + nf.format(CatacombsTracker.m6S) + "\n" + + EnumChatFormatting.GOLD + " Master Six S+ Runs: " + nf.format(CatacombsTracker.m6SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Seven S Runs: " + nf.format(CatacombsTracker.m7S) + "\n" + + EnumChatFormatting.GOLD + " Master Seven S+ Runs: " + nf.format(CatacombsTracker.m7SPlus) + "\n" + + EnumChatFormatting.GOLD + " Recombobulators: " + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + " 1st Master Stars: " + nf.format(CatacombsTracker.firstStars) + "\n" + + EnumChatFormatting.DARK_PURPLE + " 2nd Master Stars: " + nf.format(CatacombsTracker.secondStars) + "\n" + + EnumChatFormatting.DARK_PURPLE + " 3rd Master Stars: " + nf.format(CatacombsTracker.thirdStars) + "\n" + + EnumChatFormatting.DARK_PURPLE + " 4th Master Stars: " + nf.format(CatacombsTracker.fourthStars) + "\n" + + EnumChatFormatting.DARK_PURPLE + " 5th Master Stars: " + nf.format(CatacombsTracker.fifthStars) + "\n" + + EnumChatFormatting.GOLD + " Necron Dyes: " + nf.format(CatacombsTracker.necronDyes) + "\n" + + EnumChatFormatting.GOLD + " Dark Claymores: " + nf.format(CatacombsTracker.darkClaymores) + "\n" + + EnumChatFormatting.WHITE + " Rerolls: " + nf.format(CatacombsTracker.masterRerolls) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(CatacombsTracker.masterCoinsSpent) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, CatacombsTracker.masterTimeSpent) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); break; default: - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.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/mm>")); } break; default: diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java index b17794c..5a6c6a2 100644 --- a/src/main/java/me/Danker/commands/MoveCommand.java +++ b/src/main/java/me/Danker/commands/MoveCommand.java @@ -25,6 +25,8 @@ public class MoveCommand extends CommandBase { public static int[] golemTimerXY = {0 ,0}; public static int[] teammatesInRadiusXY = {0, 0}; public static int[] giantHPXY = {0, 0}; + public static int[] abilityCooldownsXY = {0, 0}; + public static int[] dungeonScoreXY = {0, 0}; @Override public String getCommandName() { @@ -33,7 +35,9 @@ public class MoveCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer/bonzotimer/golemtimer/teammatesinradius/gianthp> <x> <y>"; + return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/" + + "wateranswer/bonzotimer/golemtimer/teammatesinradius/gianthp/" + + "abilitycooldowns/dungeonscore> <x> <y>"; } public static String usage(ICommandSender arg0) { @@ -50,7 +54,7 @@ public class MoveCommand extends CommandBase { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer", "bonzotimer", "golemtimer", "teammatesinradius", - "gianthp"); + "gianthp", "abilitycooldowns", "dungeonscore"); } return null; } @@ -149,6 +153,20 @@ public class MoveCommand extends CommandBase { ConfigHandler.writeIntConfig("locations", "giantHPY", giantHPXY[1]); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Giant HP has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); break; + case "abilitycooldowns": + abilityCooldownsXY[0] = Integer.parseInt(arg1[1]); + abilityCooldownsXY[1] = Integer.parseInt(arg1[2]); + ConfigHandler.writeIntConfig("locations", "abilityCooldownsX", abilityCooldownsXY[0]); + ConfigHandler.writeIntConfig("locations", "abilityCooldownsY", abilityCooldownsXY[1]); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Ability cooldowns has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + break; + case "dungeonscore": + dungeonScoreXY[0] = Integer.parseInt(arg1[1]); + dungeonScoreXY[1] = Integer.parseInt(arg1[2]); + ConfigHandler.writeIntConfig("locations", "dungeonScoreX", dungeonScoreXY[0]); + ConfigHandler.writeIntConfig("locations", "dungeonScoreY", dungeonScoreXY[1]); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Dungeon score has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + break; default: 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 fc2f691..de3aed9 100644 --- a/src/main/java/me/Danker/commands/PetsCommand.java +++ b/src/main/java/me/Danker/commands/PetsCommand.java @@ -14,6 +14,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; import java.util.ArrayList; import java.util.List; @@ -82,7 +83,7 @@ public class PetsCommand extends CommandBase { } } - class Pet { + static class Pet { public Rarity rarity; public double xp; @@ -103,13 +104,16 @@ public class PetsCommand extends CommandBase { } } this.active = pet.get("active").getAsBoolean(); - this.name = Utils.capitalizeString(pet.get("type").getAsString());; + this.name = Utils.capitalizeString(pet.get("type").getAsString()); this.rarity = rarity; this.xp = pet.get("exp").getAsDouble(); } public String getStringToAdd() { int level = petXpToLevel(this.xp, this.rarity.name()); + if (this.name.equals("Golden Dragon") && this.xp > 25353230D) { + level = 100 + MathHelper.clamp_int((int) ((this.xp - 25353230) / 1886700) + 2, 0, 100); + } String messageToAdd = rarity.getChatColor() + " " + (this.active ? EnumChatFormatting.BOLD + ">>> " : "") + Utils.capitalizeString(this.rarity.name()) + (this.rarityBoosted ? " ⇑" : "") + " " + this.name + " (" + level + ")" + (this.active ? " <<<" : ""); @@ -155,6 +159,7 @@ public class PetsCommand extends CommandBase { String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + return; } // Get UUID for Hypixel API requests @@ -176,7 +181,7 @@ public class PetsCommand extends CommandBase { String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); - JsonObject profileResponse = APIHandler.getResponse(profileURL); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); diff --git a/src/main/java/me/Danker/commands/PlayerCommand.java b/src/main/java/me/Danker/commands/PlayerCommand.java index ef0ed4c..f097501 100644 --- a/src/main/java/me/Danker/commands/PlayerCommand.java +++ b/src/main/java/me/Danker/commands/PlayerCommand.java @@ -78,7 +78,7 @@ public class PlayerCommand extends CommandBase { String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); - JsonObject profileResponse = APIHandler.getResponse(profileURL); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); @@ -136,7 +136,7 @@ public class PlayerCommand extends CommandBase { String playerURL = "https://api.hypixel.net/player?uuid=" + uuid + "&key=" + key; System.out.println("Fetching skills from achievement API"); - JsonObject playerObject = APIHandler.getResponse(playerURL); + JsonObject playerObject = APIHandler.getResponse(playerURL, true); if (!playerObject.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); @@ -193,6 +193,11 @@ public class PlayerCommand extends CommandBase { if (slayersObject.get("wolf").getAsJsonObject().has("xp")) { wolfXP = slayersObject.get("wolf").getAsJsonObject().get("xp").getAsInt(); } + // Enderman + int endermanXP = 0; + if (slayersObject.get("enderman").getAsJsonObject().has("xp")) { + endermanXP = slayersObject.get("enderman").getAsJsonObject().get("xp").getAsInt(); + } // Bank System.out.println("Fetching bank + purse coins..."); @@ -209,7 +214,7 @@ public class PlayerCommand extends CommandBase { // Weight System.out.println("Fetching weight from Senither API..."); String weightURL = "https://hypixel-api.senither.com/v1/profiles/" + uuid + "/weight?key=" + key; - JsonObject weightResponse = APIHandler.getResponse(weightURL); + JsonObject weightResponse = APIHandler.getResponse(weightURL, true); if (weightResponse.get("status").getAsInt() != 200) { String reason = weightResponse.get("reason").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); @@ -233,10 +238,11 @@ public class PlayerCommand extends CommandBase { 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\n" + - EnumChatFormatting.AQUA + " " + username + "'s Total Slayer XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + nf.format(zombieXP + spiderXP + wolfXP) + "\n" + + EnumChatFormatting.AQUA + " " + username + "'s Total Slayer XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + nf.format(zombieXP + spiderXP + wolfXP + endermanXP) + "\n" + 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\n" + + DankersSkyblockMod.TYPE_COLOUR + " Wolf XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(wolfXP) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Enderman XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(endermanXP) + "\n\n" + EnumChatFormatting.AQUA + " " + username + "'s Coins:\n" + DankersSkyblockMod.TYPE_COLOUR + " Bank: " + (bankCoins == 0 ? EnumChatFormatting.RED + "Bank API disabled." : EnumChatFormatting.GOLD + nf.format(bankCoins)) + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Purse: " + EnumChatFormatting.GOLD + nf.format(purseCoins) + "\n" + diff --git a/src/main/java/me/Danker/commands/ReloadRepoCommand.java b/src/main/java/me/Danker/commands/ReloadRepoCommand.java new file mode 100644 index 0000000..a50a5c8 --- /dev/null +++ b/src/main/java/me/Danker/commands/ReloadRepoCommand.java @@ -0,0 +1,42 @@ +package me.Danker.commands; + +import me.Danker.DankersSkyblockMod; +import me.Danker.utils.Utils; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ChatComponentText; + +public class ReloadRepoCommand extends CommandBase { + + @Override + public String getCommandName() { + return "reloaddsmrepo"; + } + + @Override + public String getCommandUsage(ICommandSender arg0) { + return "/" + getCommandName(); + } + + public static String usage(ICommandSender arg0) { + return new ReloadRepoCommand().getCommandUsage(arg0); + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { + // MULTI THREAD DRIFTING + new Thread(() -> { + EntityPlayer player = (EntityPlayer) arg0; + Utils.refreshRepo(); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Refreshed Danker's Skyblock Mod repo.")); + }).start(); + } + +} diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java index eac4c88..c17c2ae 100644 --- a/src/main/java/me/Danker/commands/ResetLootCommand.java +++ b/src/main/java/me/Danker/commands/ResetLootCommand.java @@ -1,7 +1,7 @@ package me.Danker.commands; import me.Danker.DankersSkyblockMod; -import me.Danker.features.loot.LootTracker; +import me.Danker.features.loot.*; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -25,7 +25,7 @@ public class ResetLootCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + "<zombie/spider/wolf/fishing/mythological/catacombs/confirm/cancel>"; + return "/" + getCommandName() + "<zombie/spider/wolf/enderman/blaze/fishing/mythological/catacombs/confirm/cancel>"; } public static String usage(ICommandSender arg0) { @@ -44,7 +44,7 @@ public class ResetLootCommand extends CommandBase { if (confirmReset) { return getListOfStringsMatchingLastWord(args, "confirm", "cancel"); } else { - return getListOfStringsMatchingLastWord(args, "zombie", "spider", "wolf", "fishing", "mythological", "catacombs"); + return getListOfStringsMatchingLastWord(args, "zombie", "spider", "wolf", "enderman", "blaze", "fishing", "mythological", "catacombs"); } } @@ -53,7 +53,7 @@ public class ResetLootCommand extends CommandBase { final EntityPlayer player = (EntityPlayer) arg0; if (arg1.length == 0) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: /resetloot <zombie/spider/wolf/fishing/mythological/catacombs>")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: /resetloot <zombie/spider/wolf/enderman/blaze/fishing/mythological/catacombs>")); return; } @@ -72,6 +72,12 @@ public class ResetLootCommand extends CommandBase { case "wolf": resetWolf(); break; + case "enderman": + resetEnderman(); + break; + case "blaze": + resetBlaze(); + break; case "fishing": resetFishing(); break; @@ -98,6 +104,8 @@ public class ResetLootCommand extends CommandBase { case "zombie": case "spider": case "wolf": + case "enderman": + case "blaze": case "fishing": case "mythological": case "catacombs": @@ -118,167 +126,274 @@ public class ResetLootCommand extends CommandBase { } static void resetZombie() { - LootTracker.zombieRevsSession = 0; - LootTracker.zombieRevFleshSession = 0; - LootTracker.zombieFoulFleshSession = 0; - LootTracker.zombieFoulFleshDropsSession = 0; - LootTracker.zombiePestilencesSession = 0; - LootTracker.zombieUndeadCatasSession = 0; - LootTracker.zombieBooksSession = 0; - LootTracker.zombieBeheadedsSession = 0; - LootTracker.zombieRevCatasSession = 0; - LootTracker.zombieSnakesSession = 0; - LootTracker.zombieScythesSession = 0; - LootTracker.zombieTimeSession = -1; - LootTracker.zombieBossesSession = -1; + ZombieTracker.zombieRevsSession = 0; + ZombieTracker.zombieRevFleshSession = 0; + ZombieTracker.zombieRevVisceraSession = 0; + ZombieTracker.zombieFoulFleshSession = 0; + ZombieTracker.zombieFoulFleshDropsSession = 0; + ZombieTracker.zombiePestilencesSession = 0; + ZombieTracker.zombieUndeadCatasSession = 0; + ZombieTracker.zombieBooksSession = 0; + ZombieTracker.zombieBooksT7Session = 0; + ZombieTracker.zombieBeheadedsSession = 0; + ZombieTracker.zombieRevCatasSession = 0; + ZombieTracker.zombieSnakesSession = 0; + ZombieTracker.zombieScythesSession = 0; + ZombieTracker.zombieTimeSession = -1; + ZombieTracker.zombieBossesSession = -1; ConfigHandler.deleteCategory("zombie"); ConfigHandler.reloadConfig(); } static void resetSpider() { - LootTracker.spiderTarantulasSession = 0; - LootTracker.spiderWebsSession = 0; - LootTracker.spiderTAPSession = 0; - LootTracker.spiderTAPDropsSession = 0; - LootTracker.spiderBitesSession = 0; - LootTracker.spiderCatalystsSession = 0; - LootTracker.spiderBooksSession = 0; - LootTracker.spiderSwattersSession = 0; - LootTracker.spiderTalismansSession = 0; - LootTracker.spiderMosquitosSession = 0; - LootTracker.spiderTimeSession = -1; - LootTracker.spiderBossesSession = -1; + SpiderTracker.spiderTarantulasSession = 0; + SpiderTracker.spiderWebsSession = 0; + SpiderTracker.spiderTAPSession = 0; + SpiderTracker.spiderTAPDropsSession = 0; + SpiderTracker.spiderBitesSession = 0; + SpiderTracker.spiderCatalystsSession = 0; + SpiderTracker.spiderBooksSession = 0; + SpiderTracker.spiderSwattersSession = 0; + SpiderTracker.spiderTalismansSession = 0; + SpiderTracker.spiderMosquitosSession = 0; + SpiderTracker.spiderTimeSession = -1; + SpiderTracker.spiderBossesSession = -1; ConfigHandler.deleteCategory("spider"); ConfigHandler.reloadConfig(); } static void resetWolf() { - LootTracker.wolfSvensSession = 0; - LootTracker.wolfTeethSession = 0; - LootTracker.wolfWheelsSession = 0; - LootTracker.wolfWheelsDropsSession = 0; - LootTracker.wolfSpiritsSession = 0; - LootTracker.wolfBooksSession = 0; - LootTracker.wolfEggsSession = 0; - LootTracker.wolfCouturesSession = 0; - LootTracker.wolfBaitsSession = 0; - LootTracker.wolfFluxesSession = 0; - LootTracker.wolfTimeSession = -1; - LootTracker.wolfBossesSession = -1; + WolfTracker.wolfSvensSession = 0; + WolfTracker.wolfTeethSession = 0; + WolfTracker.wolfWheelsSession = 0; + WolfTracker.wolfWheelsDropsSession = 0; + WolfTracker.wolfSpiritsSession = 0; + WolfTracker.wolfBooksSession = 0; + WolfTracker.wolfEggsSession = 0; + WolfTracker.wolfCouturesSession = 0; + WolfTracker.wolfBaitsSession = 0; + WolfTracker.wolfFluxesSession = 0; + WolfTracker.wolfTimeSession = -1; + WolfTracker.wolfBossesSession = -1; ConfigHandler.deleteCategory("wolf"); ConfigHandler.reloadConfig(); } + + static void resetEnderman() { + EndermanTracker.endermanVoidgloomsSession = 0; + EndermanTracker.endermanNullSpheresSession = 0; + EndermanTracker.endermanTAPSession = 0; + EndermanTracker.endermanTAPDropsSession = 0; + EndermanTracker.endermanEndersnakesSession = 0; + EndermanTracker.endermanSummoningEyesSession = 0; + EndermanTracker.endermanManaBooksSession = 0; + EndermanTracker.endermanTunersSession = 0; + EndermanTracker.endermanAtomsSession = 0; + EndermanTracker.endermanEspressoMachinesSession = 0; + EndermanTracker.endermanSmartyBooksSession = 0; + EndermanTracker.endermanEndRunesSession = 0; + EndermanTracker.endermanChalicesSession = 0; + EndermanTracker.endermanDiceSession = 0; + EndermanTracker.endermanArtifactsSession = 0; + EndermanTracker.endermanSkinsSession = 0; + EndermanTracker.endermanMergersSession = 0; + EndermanTracker.endermanCoresSession = 0; + EndermanTracker.endermanEnchantRunesSession = 0; + EndermanTracker.endermanEnderBooksSession = 0; + EndermanTracker.endermanTimeSession = -1; + EndermanTracker.endermanBossesSession = -1; + ConfigHandler.deleteCategory("enderman"); + ConfigHandler.reloadConfig(); + } + + static void resetBlaze() { + BlazeTracker.demonlordsSession = 0; + BlazeTracker.derelictAshesSession = 0; + BlazeTracker.lavatearRunesSession = 0; + BlazeTracker.splashPotionsSession = 0; + BlazeTracker.magmaArrowsSession = 0; + BlazeTracker.manaDisintegratorsSession = 0; + BlazeTracker.scorchedBooksSession = 0; + BlazeTracker.kelvinInvertersSession = 0; + BlazeTracker.blazeRodDistillatesSession = 0; + BlazeTracker.glowstoneDistillatesSession = 0; + BlazeTracker.magmaCreamDistillatesSession = 0; + BlazeTracker.netherWartDistillatesSession = 0; + BlazeTracker.gabagoolDistillatesSession = 0; + BlazeTracker.scorchedPowerCrystalsSession = 0; + BlazeTracker.fireAspectBooksSession = 0; + BlazeTracker.fieryBurstRunesSession = 0; + BlazeTracker.opalGemsSession = 0; + BlazeTracker.archfiendDiceSession = 0; + BlazeTracker.duplexBooksSession = 0; + BlazeTracker.highClassArchfiendDiceSession = 0; + BlazeTracker.engineeringPlansSession = 0; + BlazeTracker.subzeroInvertersSession = 0; + BlazeTracker.timeSession = 0; + BlazeTracker.bossesSession = 0; + ConfigHandler.deleteCategory("blaze"); + ConfigHandler.reloadConfig(); + } static void resetFishing() { - LootTracker.seaCreaturesSession = 0; - LootTracker.goodCatchesSession = 0; - LootTracker.greatCatchesSession = 0; - LootTracker.squidsSession = 0; - LootTracker.seaWalkersSession = 0; - LootTracker.nightSquidsSession = 0; - LootTracker.seaGuardiansSession = 0; - LootTracker.seaWitchesSession = 0; - LootTracker.seaArchersSession = 0; - LootTracker.monsterOfTheDeepsSession = 0; - LootTracker.catfishesSession = 0; - LootTracker.carrotKingsSession = 0; - LootTracker.seaLeechesSession = 0; - LootTracker.guardianDefendersSession = 0; - LootTracker.deepSeaProtectorsSession = 0; - LootTracker.hydrasSession = 0; - LootTracker.seaEmperorsSession = 0; - LootTracker.empTimeSession = -1; - LootTracker.empSCsSession = -1; - LootTracker.fishingMilestoneSession = 0; - LootTracker.frozenStevesSession = 0; - LootTracker.frostyTheSnowmansSession = 0; - LootTracker.grinchesSession = 0; - LootTracker.yetisSession = 0; - LootTracker.yetiTimeSession = -1; - LootTracker.yetiSCsSession = -1; - LootTracker.nurseSharksSession = 0; - LootTracker.blueSharksSession = 0; - LootTracker.tigerSharksSession = 0; - LootTracker.greatWhiteSharksSession = 0; - LootTracker.scarecrowsSession = 0; - LootTracker.nightmaresSession = 0; - LootTracker.werewolfsSession = 0; - LootTracker.phantomFishersSession = 0; - LootTracker.grimReapersSession = 0; + FishingTracker.seaCreaturesSession = 0; + FishingTracker.goodCatchesSession = 0; + FishingTracker.greatCatchesSession = 0; + FishingTracker.squidsSession = 0; + FishingTracker.seaWalkersSession = 0; + FishingTracker.nightSquidsSession = 0; + FishingTracker.seaGuardiansSession = 0; + FishingTracker.seaWitchesSession = 0; + FishingTracker.seaArchersSession = 0; + FishingTracker.monsterOfTheDeepsSession = 0; + FishingTracker.catfishesSession = 0; + FishingTracker.carrotKingsSession = 0; + FishingTracker.seaLeechesSession = 0; + FishingTracker.guardianDefendersSession = 0; + FishingTracker.deepSeaProtectorsSession = 0; + FishingTracker.hydrasSession = 0; + FishingTracker.seaEmperorsSession = 0; + FishingTracker.empTimeSession = -1; + FishingTracker.empSCsSession = -1; + FishingTracker.fishingMilestoneSession = 0; + FishingTracker.frozenStevesSession = 0; + FishingTracker.frostyTheSnowmansSession = 0; + FishingTracker.grinchesSession = 0; + FishingTracker.yetisSession = 0; + FishingTracker.yetiTimeSession = -1; + FishingTracker.yetiSCsSession = -1; + FishingTracker.nurseSharksSession = 0; + FishingTracker.blueSharksSession = 0; + FishingTracker.tigerSharksSession = 0; + FishingTracker.greatWhiteSharksSession = 0; + FishingTracker.scarecrowsSession = 0; + FishingTracker.nightmaresSession = 0; + FishingTracker.werewolfsSession = 0; + FishingTracker.phantomFishersSession = 0; + FishingTracker.grimReapersSession = 0; + FishingTracker.waterWormsSession = 0; + FishingTracker.poisonedWaterWormsSession = 0; + FishingTracker.flamingWormsSession = 0; + FishingTracker.lavaBlazesSession = 0; + FishingTracker.lavaPigmenSession = 0; + FishingTracker.zombieMinersSession = 0; + FishingTracker.magmaSlugsSession = 0; + FishingTracker.moogmasSession = 0; + FishingTracker.lavaLeechesSession = 0; + FishingTracker.pyroclasticWormsSession = 0; + FishingTracker.lavaFlamesSession = 0; + FishingTracker.fireEelsSession = 0; + FishingTracker.taurusesSession = 0; + FishingTracker.thundersSession = 0; + FishingTracker.lordJawbusesSession = 0; + FishingTracker.jawbusTimeSession = 0; + FishingTracker.jawbusSCsSession = 0; ConfigHandler.deleteCategory("fishing"); ConfigHandler.reloadConfig(); } static void resetMythological() { - LootTracker.mythCoinsSession = 0; - LootTracker.griffinFeathersSession = 0; - LootTracker.crownOfGreedsSession = 0; - LootTracker.washedUpSouvenirsSession = 0; - LootTracker.minosHuntersSession = 0; - LootTracker.siameseLynxesSession = 0; - LootTracker.minotaursSession = 0; - LootTracker.gaiaConstructsSession = 0; - LootTracker.minosChampionsSession = 0; - LootTracker.minosInquisitorsSession = 0; + MythologicalTracker.mythCoinsSession = 0; + MythologicalTracker.griffinFeathersSession = 0; + MythologicalTracker.crownOfGreedsSession = 0; + MythologicalTracker.washedUpSouvenirsSession = 0; + MythologicalTracker.minosHuntersSession = 0; + MythologicalTracker.siameseLynxesSession = 0; + MythologicalTracker.minotaursSession = 0; + MythologicalTracker.gaiaConstructsSession = 0; + MythologicalTracker.minosChampionsSession = 0; + MythologicalTracker.minosInquisitorsSession = 0; ConfigHandler.deleteCategory("mythological"); ConfigHandler.reloadConfig(); } static void resetCatacombs() { - LootTracker.recombobulatorsSession = 0; - LootTracker.fumingPotatoBooksSession = 0; - LootTracker.bonzoStaffsSession = 0; - LootTracker.f1CoinsSpentSession = 0; - LootTracker.f1TimeSpentSession = 0; - LootTracker.scarfStudiesSession = 0; - LootTracker.f2CoinsSpentSession = 0; - LootTracker.f2TimeSpentSession = 0; - LootTracker.adaptiveHelmsSession = 0; - LootTracker.adaptiveChestsSession = 0; - LootTracker.adaptiveLegsSession = 0; - LootTracker.adaptiveBootsSession = 0; - LootTracker.adaptiveSwordsSession = 0; - LootTracker.f3CoinsSpentSession = 0; - LootTracker.f3TimeSpentSession = 0; - LootTracker.spiritWingsSession = 0; - LootTracker.spiritBonesSession = 0; - LootTracker.spiritBootsSession = 0; - LootTracker.spiritSwordsSession = 0; - LootTracker.epicSpiritPetsSession = 0; - LootTracker.f4CoinsSpentSession = 0; - LootTracker.f4TimeSpentSession = 0; - LootTracker.warpedStonesSession = 0; - LootTracker.shadowAssHelmsSession = 0; - LootTracker.shadowAssChestsSession = 0; - LootTracker.shadowAssLegsSession = 0; - LootTracker.shadowAssBootsSession = 0; - LootTracker.lividDaggersSession = 0; - LootTracker.shadowFurysSession = 0; - LootTracker.f5CoinsSpentSession = 0; - LootTracker.f5TimeSpentSession = 0; - LootTracker.ancientRosesSession = 0; - LootTracker.precursorEyesSession = 0; - LootTracker.giantsSwordsSession = 0; - LootTracker.necroLordHelmsSession = 0; - LootTracker.necroLordChestsSession = 0; - LootTracker.necroLordLegsSession = 0; - LootTracker.necroLordBootsSession = 0; - LootTracker.necroSwordsSession = 0; - LootTracker.f6CoinsSpentSession = 0; - LootTracker.f6TimeSpentSession = 0; - LootTracker.witherBloodsSession = 0; - LootTracker.witherCloaksSession = 0; - LootTracker.implosionsSession = 0; - LootTracker.witherShieldsSession = 0; - LootTracker.shadowWarpsSession = 0; - LootTracker.necronsHandlesSession = 0; - LootTracker.autoRecombsSession = 0; - LootTracker.witherHelmsSession = 0; - LootTracker.witherChestsSession = 0; - LootTracker.witherLegsSession = 0; - LootTracker.witherBootsSession = 0; - LootTracker.f7CoinsSpentSession = 0; - LootTracker.f7TimeSpentSession = 0; + CatacombsTracker.recombobulatorsSession = 0; + CatacombsTracker.fumingPotatoBooksSession = 0; + CatacombsTracker.f1SPlusSession = 0; + CatacombsTracker.bonzoStaffsSession = 0; + CatacombsTracker.f1CoinsSpentSession = 0; + CatacombsTracker.f1TimeSpentSession = 0; + CatacombsTracker.f2SPlusSession = 0; + CatacombsTracker.scarfStudiesSession = 0; + CatacombsTracker.f2CoinsSpentSession = 0; + CatacombsTracker.f2TimeSpentSession = 0; + CatacombsTracker.f3SPlusSession = 0; + CatacombsTracker.adaptiveHelmsSession = 0; + CatacombsTracker.adaptiveChestsSession = 0; + CatacombsTracker.adaptiveLegsSession = 0; + CatacombsTracker.adaptiveBootsSession = 0; + CatacombsTracker.adaptiveSwordsSession = 0; + CatacombsTracker.f3CoinsSpentSession = 0; + CatacombsTracker.f3TimeSpentSession = 0; + CatacombsTracker.f4SPlusSession = 0; + CatacombsTracker.spiritWingsSession = 0; + CatacombsTracker.spiritBonesSession = 0; + CatacombsTracker.spiritBootsSession = 0; + CatacombsTracker.spiritSwordsSession = 0; + CatacombsTracker.epicSpiritPetsSession = 0; + CatacombsTracker.f4CoinsSpentSession = 0; + CatacombsTracker.f4TimeSpentSession = 0; + CatacombsTracker.f5SPlusSession = 0; + CatacombsTracker.warpedStonesSession = 0; + CatacombsTracker.shadowAssHelmsSession = 0; + CatacombsTracker.shadowAssChestsSession = 0; + CatacombsTracker.shadowAssLegsSession = 0; + CatacombsTracker.shadowAssBootsSession = 0; + CatacombsTracker.lividDaggersSession = 0; + CatacombsTracker.shadowFurysSession = 0; + CatacombsTracker.f5CoinsSpentSession = 0; + CatacombsTracker.f5TimeSpentSession = 0; + CatacombsTracker.f6SPlusSession = 0; + CatacombsTracker.ancientRosesSession = 0; + CatacombsTracker.precursorEyesSession = 0; + CatacombsTracker.giantsSwordsSession = 0; + CatacombsTracker.necroLordHelmsSession = 0; + CatacombsTracker.necroLordChestsSession = 0; + CatacombsTracker.necroLordLegsSession = 0; + CatacombsTracker.necroLordBootsSession = 0; + CatacombsTracker.necroSwordsSession = 0; + CatacombsTracker.f6RerollsSession = 0; + CatacombsTracker.f6CoinsSpentSession = 0; + CatacombsTracker.f6TimeSpentSession = 0; + CatacombsTracker.f7SPlusSession = 0; + CatacombsTracker.witherBloodsSession = 0; + CatacombsTracker.witherCloaksSession = 0; + CatacombsTracker.implosionsSession = 0; + CatacombsTracker.witherShieldsSession = 0; + CatacombsTracker.shadowWarpsSession = 0; + CatacombsTracker.necronsHandlesSession = 0; + CatacombsTracker.autoRecombsSession = 0; + CatacombsTracker.witherHelmsSession = 0; + CatacombsTracker.witherChestsSession = 0; + CatacombsTracker.witherLegsSession = 0; + CatacombsTracker.witherBootsSession = 0; + CatacombsTracker.f7RerollsSession = 0; + CatacombsTracker.f7CoinsSpentSession = 0; + CatacombsTracker.f7TimeSpentSession = 0; + CatacombsTracker.m1SSession = 0; + CatacombsTracker.m1SPlusSession = 0; + CatacombsTracker.m2SSession = 0; + CatacombsTracker.m2SPlusSession = 0; + CatacombsTracker.m3SSession = 0; + CatacombsTracker.m3SPlusSession = 0; + CatacombsTracker.m4SSession = 0; + CatacombsTracker.m4SPlusSession = 0; + CatacombsTracker.m5SSession = 0; + CatacombsTracker.m5SPlusSession = 0; + CatacombsTracker.m6SSession = 0; + CatacombsTracker.m6SPlusSession = 0; + CatacombsTracker.m7SSession = 0; + CatacombsTracker.m7SPlusSession = 0; + CatacombsTracker.firstStarsSession = 0; + CatacombsTracker.secondStarsSession = 0; + CatacombsTracker.thirdStarsSession = 0; + CatacombsTracker.fourthStarsSession = 0; + CatacombsTracker.fifthStarsSession = 0; + CatacombsTracker.darkClaymoresSession = 0; + CatacombsTracker.masterRerollsSession = 0; + CatacombsTracker.masterCoinsSpentSession = 0; + CatacombsTracker.masterTimeSpentSession = 0; ConfigHandler.deleteCategory("catacombs"); ConfigHandler.reloadConfig(); } diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java index def0e57..9bb1f08 100644 --- a/src/main/java/me/Danker/commands/ScaleCommand.java +++ b/src/main/java/me/Danker/commands/ScaleCommand.java @@ -25,6 +25,8 @@ public class ScaleCommand extends CommandBase { public static double golemTimerScale; public static double teammatesInRadiusScale; public static double giantHPScale; + public static double abilityCooldownsScale; + public static double dungeonScoreScale; @Override public String getCommandName() { @@ -33,7 +35,8 @@ public class ScaleCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer/bonzotimer/golemtimer/teammatesinradius/gianthp> <size (0.1 - 10)>"; + return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer/" + + "bonzotimer/golemtimer/teammatesinradius/gianthp/abilitycooldown/dungeonscore> <size (0.1 - 10)>"; } public static String usage(ICommandSender arg0) { @@ -50,7 +53,7 @@ public class ScaleCommand extends CommandBase { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer", "bonzotimer", "golemtimer", "teammatesinradius", - "gianthp"); + "gianthp", "abilitycooldowns", "dungeonscore"); } return null; } @@ -131,6 +134,16 @@ public class ScaleCommand extends CommandBase { ConfigHandler.writeDoubleConfig("scales", "giantHPScale", giantHPScale); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Giant hp has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + giantHPScale + "x")); break; + case "abilitycooldowns": + abilityCooldownsScale = scaleAmount; + ConfigHandler.writeDoubleConfig("scales", "abilityCooldownsScale", abilityCooldownsScale); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Ability cooldowns has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + abilityCooldownsScale + "x")); + break; + case "dungeonscore": + dungeonScoreScale = scaleAmount; + ConfigHandler.writeDoubleConfig("scales", "dungeonScoreScale", dungeonScoreScale); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Dungeon score has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + dungeonScoreScale + "x")); + break; default: 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 6195e81..f17c79d 100644 --- a/src/main/java/me/Danker/commands/SkillsCommand.java +++ b/src/main/java/me/Danker/commands/SkillsCommand.java @@ -54,6 +54,7 @@ public class SkillsCommand extends CommandBase { String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + return; } // Get UUID for Hypixel API requests @@ -75,7 +76,7 @@ public class SkillsCommand extends CommandBase { String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); - JsonObject profileResponse = APIHandler.getResponse(profileURL); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); @@ -132,7 +133,7 @@ public class SkillsCommand extends CommandBase { String playerURL = "https://api.hypixel.net/player?uuid=" + uuid + "&key=" + key; System.out.println("Fetching skills from achievement API"); - JsonObject playerObject = APIHandler.getResponse(playerURL); + JsonObject playerObject = APIHandler.getResponse(playerURL, true); if (!playerObject.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); diff --git a/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java b/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java index f8db0af..37e89c5 100644 --- a/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java +++ b/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java @@ -53,11 +53,12 @@ public class SkyblockPlayersCommand extends CommandBase { String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + return; } String playersURL = "https://api.hypixel.net/gameCounts?key=" + key; System.out.println("Fetching player count..."); - JsonObject playersResponse = APIHandler.getResponse(playersURL); + JsonObject playersResponse = APIHandler.getResponse(playersURL, true); if (!playersResponse.get("success").getAsBoolean()) { String reason = playersResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); @@ -69,14 +70,14 @@ public class SkyblockPlayersCommand extends CommandBase { int skyblockTotalPlayers = 0; // players int privateIsland = 0; // dynamic int hub = 0; // hub - int barn = 0; // farming_1 - int mushroomDesert = 0; // farming_2 + int farmingIslands = 0; // farming_1 int park = 0; // foraging_1 int goldMine = 0; // mining_1 int deepCaverns = 0; // mining_2 int dwarvenMines = 0; // mining_3 + int crystalHollows = 0; // crystal_hollows int spidersDen = 0; // combat_1 - int blazingFortress = 0; // combat_2 + int crimsonIsle = 0; // crimson_isle int end = 0; // combat_3 int dungeonsHub = 0; // dungeon_hub int dungeons = 0; // dungeon @@ -92,10 +93,7 @@ public class SkyblockPlayersCommand extends CommandBase { hub = skyblockPlayers.get("hub").getAsInt(); } if (skyblockPlayers.has("farming_1")) { - barn = skyblockPlayers.get("farming_1").getAsInt(); - } - if (skyblockPlayers.has("farming_2")) { - mushroomDesert = skyblockPlayers.get("farming_2").getAsInt(); + farmingIslands = skyblockPlayers.get("farming_1").getAsInt(); } if (skyblockPlayers.has("foraging_1")) { park = skyblockPlayers.get("foraging_1").getAsInt(); @@ -109,11 +107,14 @@ public class SkyblockPlayersCommand extends CommandBase { if (skyblockPlayers.has("mining_3")) { dwarvenMines = skyblockPlayers.get("mining_3").getAsInt(); } + if (skyblockPlayers.has("crystal_hollows")) { + crystalHollows = skyblockPlayers.get("crystal_hollows").getAsInt(); + } if (skyblockPlayers.has("combat_1")) { spidersDen = skyblockPlayers.get("combat_1").getAsInt(); } - if (skyblockPlayers.has("combat_2")) { - blazingFortress = skyblockPlayers.get("combat_2").getAsInt(); + if (skyblockPlayers.has("crimson_isle")) { + crimsonIsle = skyblockPlayers.get("crimson_isle").getAsInt(); } if (skyblockPlayers.has("combat_3")) { end = skyblockPlayers.get("combat_3").getAsInt(); @@ -138,14 +139,14 @@ public class SkyblockPlayersCommand extends CommandBase { 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 + " Farming Islands: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(farmingIslands) + " / " + Utils.getPercentage(farmingIslands, 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 + " Dwarven Mines: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(dwarvenMines) + " / " + Utils.getPercentage(dwarvenMines, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Crystal Hollows: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(crystalHollows) + " / " + Utils.getPercentage(crystalHollows, 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 + " Crimson Isle: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(crimsonIsle) + " / " + Utils.getPercentage(crimsonIsle, 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" + diff --git a/src/main/java/me/Danker/commands/SlayerCommand.java b/src/main/java/me/Danker/commands/SlayerCommand.java index 91a1a61..8ad87ae 100644 --- a/src/main/java/me/Danker/commands/SlayerCommand.java +++ b/src/main/java/me/Danker/commands/SlayerCommand.java @@ -27,7 +27,7 @@ public class SlayerCommand extends CommandBase { @Override public List<String> getCommandAliases() { - return Collections.singletonList("slayer"); + return Collections.singletonList("slayers"); } @Override @@ -62,6 +62,7 @@ public class SlayerCommand extends CommandBase { String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + return; } // Get UUID for Hypixel API requests @@ -83,7 +84,7 @@ public class SlayerCommand extends CommandBase { String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); - JsonObject profileResponse = APIHandler.getResponse(profileURL); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); @@ -107,14 +108,26 @@ public class SlayerCommand extends CommandBase { if (slayersObject.get("wolf").getAsJsonObject().has("xp")) { wolfXP = slayersObject.get("wolf").getAsJsonObject().get("xp").getAsInt(); } + // Enderman + int endermanXP = 0; + if (slayersObject.get("enderman").getAsJsonObject().has("xp")) { + endermanXP = slayersObject.get("enderman").getAsJsonObject().get("xp").getAsInt(); + } + // Blaze + int blazeXP = 0; + if (slayersObject.get("blaze").getAsJsonObject().has("xp")) { + blazeXP = slayersObject.get("blaze").getAsJsonObject().get("xp").getAsInt(); + } NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); 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" + + EnumChatFormatting.AQUA + " " + username + "'s Total XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + nf.format(zombieXP + spiderXP + wolfXP + endermanXP + blazeXP) + "\n" + 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 + "-------------------")); + DankersSkyblockMod.TYPE_COLOUR + " Enderman XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(endermanXP) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Blaze XP: " + DankersSkyblockMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(blazeXP) + "\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 c04e0a8..6b659ab 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -14,10 +14,12 @@ import net.minecraft.util.ChatComponentText; import java.util.List; public class ToggleCommand extends CommandBase implements ICommand { + // Some of these end with toggled and some don't, I don't want to go back and fix them all for consistency public static boolean gpartyToggled; public static boolean coordsToggled; public static boolean goldenToggled; public static boolean slayerCountTotal; + public static boolean masterSPlusDisplay; public static boolean rngesusAlerts; public static boolean ghostDisplay; public static boolean splitFishing; @@ -38,6 +40,18 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean giantHP; public static boolean hidePetCandy; public static boolean highlightCommissions; + public static boolean customColouredNames; + public static boolean endOfFarmAlert; + public static boolean gemstoneLore; + public static boolean crystalHollowWaypoints; + public static boolean crystalAutoWaypoints; + public static boolean crystalAutoPlayerWaypoints; + public static boolean autoAcceptReparty; + public static boolean abilityCooldowns; + public static boolean alerts; + public static boolean dungeonScore; + public static boolean hideArmour; + public static boolean autoJoinSkyblock; // Chat Messages public static boolean sceptreMessages; public static boolean midasStaffMessages; @@ -46,12 +60,12 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean cooldownMessages; public static boolean manaMessages; public static boolean killComboMessages; - // Dungeons Messages public static boolean lowHealthNotifyToggled; public static boolean lividSolverToggled; public static boolean stopSalvageStarredToggled; public static boolean watcherReadyToggled; public static boolean swapToPickBlockToggled; + public static boolean flowerWeaponsToggled; public static boolean notifySlayerSlainToggled; public static boolean necronNotificationsToggled; public static boolean bonzoTimerToggled; @@ -61,6 +75,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean oruoToggled; public static boolean blazeToggled; public static boolean creeperToggled; + public static boolean creeperLinesToggled; public static boolean waterToggled; public static boolean ticTacToeToggled; public static boolean boulderToggled; @@ -70,6 +85,9 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean startsWithToggled; public static boolean selectAllToggled; public static boolean clickInOrderToggled; + public static boolean sameColourToggled; + public static boolean blockWrongTerminalClicksToggled; + public static boolean itemFrameOnSeaLanternsToggled; // Experiments public static boolean ultrasequencerToggled; public static boolean chronomatronToggled; @@ -80,25 +98,28 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean dungeonBossMusic; public static boolean bloodRoomMusic; public static boolean dungeonMusic; + public static boolean hubMusic; + public static boolean islandMusic; + public static boolean dungeonHubMusic; + public static boolean farmingIslandsMusic; + public static boolean goldMineMusic; + public static boolean deepCavernsMusic; + public static boolean dwarvenMinesMusic; + public static boolean crystalHollowsMusic; + public static boolean spidersDenMusic; + public static boolean crimsonIsleMusic; + public static boolean endMusic; + public static boolean parkMusic; - @Override + // NO LONGER UPDATED + @Override public String getCommandName() { return "toggle"; } @Override public String getCommandUsage(ICommandSender arg0) { - - return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/ghostdisplay/chatmaddox/spiritbearalert/" + - "sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/" + //ghosttimer - "skill50display/outlinetext/midasstaffmessages/implosionmessages/healmessages/cooldownmessages/" + - "manamessages/killcombomessages/caketimer/lowhealthnotify/lividsolver/stopsalvagestarred/" + - "notifyslayerslain/necronnotifications/bonzotimer/threemanpuzzle/oruopuzzle/blazepuzzle/" + - "creeperpuzzle/waterpuzzle/tictactoepuzzle/boulderpuzzle/silverfishpuzzle/icewalkpuzzle/watchermessage/" + - "startswithterminal/selectallterminal/clickinorderterminal/" + - "ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/" + - "melodytooltips/highlightslayers/highlightarachne/highlightskeletonmasters/teammatesinradius/" + - "gianthp/hidepetcandy/dungeonbossmusic/bloodroommusic/dungeonmusic/highlightcommissions/list>"; + return "/" + getCommandName() + " <too many to list>"; } public static String usage(ICommandSender arg0) { @@ -114,24 +135,28 @@ public class ToggleCommand extends CommandBase implements ICommand { public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "highlightArachne", - "splitfishing", "chatmaddox", "spiritbearalerts", + "splitfishing", "chatmaddox", "spiritbearalerts", "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "cooldownmessages", "manamessages", "killcombomessages", "caketimer", "lowhealthnotify", "autoskilltracker", "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", "bonzotimer", "threemanpuzzle", "oruopuzzle", "blazepuzzle", - "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "boulderpuzzle", + "creeperpuzzle", "creeperlines", "waterpuzzle", "tictactoepuzzle", "boulderpuzzle", "silverfishpuzzle", "icewalkpuzzle", "watchermessage", "startswithterminal", - "selectallterminal", "clickinorderterminal", - "ultrasequencer", "chronomatron", "superpairs", + "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", + "ultrasequencer", "chronomatron", "superpairs", "itemframeonsealanterns", "hidetooltipsinaddons", "pickblock", "melodytooltips", "highlightslayers", "highlightskeletonmasters", "dungeonbossmusic", "bloodroommusic", "dungeonmusic", - "teammatesinradius", "gianthp", "hidepetcandy", "highlightcommissions", "list"); + "teammatesinradius", "gianthp", "hidepetcandy", "customcolorednames", "endoffarmalert", + "gemstonelore", "crystalhollowwaypoints", "crystalautowaypoints", "autoacceptreparty", + "itemcooldowns", "hubmusic", "islandmusic", "dungeonhubmusic", "farmingislandsmusic", "goldminemusic", + "deepcavernsmusic", "dwarvenminesmusic", "crystalhollowsmusic", "spidersdenmusic", "blazingfortressmusic", + "endmusic", "parkmusic", "alerts", "dungeonscore", "highlightcommissions", "list"); } return null; } - + @Override public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { final EntityPlayer player = (EntityPlayer)arg0; @@ -192,6 +217,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "SceptreMessages", sceptreMessages); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Spirit Sceptre messages have been set to " + DankersSkyblockMod.SECONDARY_COLOUR + sceptreMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "flowerweapons": + flowerWeaponsToggled = !flowerWeaponsToggled; + ConfigHandler.writeBooleanConfig("toggles", "FlowerWeapons", flowerWeaponsToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Prevent Placing FoT/Spirit Sceptre been set to " + DankersSkyblockMod.SECONDARY_COLOUR + flowerWeaponsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "midasstaffmessages": midasStaffMessages = !midasStaffMessages; ConfigHandler.writeBooleanConfig("toggles", "MidasStaffMessages", midasStaffMessages); @@ -291,7 +321,7 @@ public class ToggleCommand extends CommandBase implements ICommand { case "bonzotimer": bonzoTimerToggled = !bonzoTimerToggled; ConfigHandler.writeBooleanConfig("toggles", "BonzoTimer", bonzoTimerToggled); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Bonzo's Mask timer has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + necronNotificationsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Bonzo's Mask timer has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + bonzoTimerToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "autoskilltracker": autoSkillTrackerToggled = !autoSkillTrackerToggled; @@ -318,6 +348,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "CreeperPuzzle", creeperToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Creeper puzzle solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + creeperToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "creeperlines": + creeperLinesToggled = !creeperLinesToggled; + ConfigHandler.writeBooleanConfig("toggles", "CreeperLines", creeperLinesToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Creeper lines has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + creeperLinesToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "waterpuzzle": waterToggled = !waterToggled; ConfigHandler.writeBooleanConfig("toggles", "WaterPuzzle", waterToggled); @@ -363,6 +398,16 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "ClickInOrderTerminal", clickInOrderToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Click in order terminal helper has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + selectAllToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "blockwrongterminalclicks": + blockWrongTerminalClicksToggled = !blockWrongTerminalClicksToggled; + ConfigHandler.writeBooleanConfig("toggles", "BlockWrongTerminalClicks", blockWrongTerminalClicksToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Block wrong clicks on terminals has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + blockWrongTerminalClicksToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "itemframeonsealanterns": + itemFrameOnSeaLanternsToggled = !itemFrameOnSeaLanternsToggled; + ConfigHandler.writeBooleanConfig("toggles", "IgnoreItemFrameOnSeaLanterns", itemFrameOnSeaLanternsToggled); + 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); @@ -427,6 +472,41 @@ public class ToggleCommand extends CommandBase implements ICommand { highlightCommissions = !highlightCommissions; ConfigHandler.writeBooleanConfig("toggles", "HighlightCommissions", highlightCommissions); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Commissions has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + highlightCommissions + DankersSkyblockMod.MAIN_COLOUR + ".")); + case "customcolorednames": + case "customcolourednames": + customColouredNames = !customColouredNames; + ConfigHandler.writeBooleanConfig("toggles", "CustomColouredNames", customColouredNames); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom name colors has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + customColouredNames + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "endoffarmalert": + endOfFarmAlert = !endOfFarmAlert; + ConfigHandler.writeBooleanConfig("toggles", "EndOfFarmAlert", endOfFarmAlert); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "End of farm alert has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + endOfFarmAlert + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "gemstonelore": + gemstoneLore = !gemstoneLore; + ConfigHandler.writeBooleanConfig("toggles", "GemstoneLore", gemstoneLore); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Gemstone in lore has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + gemstoneLore + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "crystalhollowwaypoints": + crystalHollowWaypoints = !crystalHollowWaypoints; + ConfigHandler.writeBooleanConfig("toggles", "CrystalHollowWaypoints", crystalHollowWaypoints); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Crystal Hollows waypoints has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + crystalHollowWaypoints + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "crystalautowaypoints": + crystalAutoWaypoints = !crystalAutoWaypoints; + ConfigHandler.writeBooleanConfig("toggles", "CrystalAutoWaypoints", crystalAutoWaypoints); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto Crystal Hollows waypoints has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + crystalAutoWaypoints + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "autoacceptreparty": + autoAcceptReparty = !autoAcceptReparty; + ConfigHandler.writeBooleanConfig("toggles", "AutoAcceptReparty", autoAcceptReparty); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto accept reparty has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + autoAcceptReparty + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "abilitycooldowns": + abilityCooldowns = !abilityCooldowns; + ConfigHandler.writeBooleanConfig("toggles", "AbilityCooldowns", abilityCooldowns); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Ability cooldowns display as been set to " + DankersSkyblockMod.SECONDARY_COLOUR + abilityCooldowns + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "dungeonbossmusic": dungeonBossMusic = !dungeonBossMusic; @@ -446,6 +526,88 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "DungeonMusic", dungeonMusic); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom dungeon music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + dungeonMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "hubmusic": + hubMusic = !hubMusic; + CustomMusic.hub.stop(); + ConfigHandler.writeBooleanConfig("toggles", "HubMusic", hubMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom hub music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + hubMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "islandmusic": + islandMusic = !islandMusic; + CustomMusic.island.stop(); + ConfigHandler.writeBooleanConfig("toggles", "IslandMusic", islandMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom island music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + islandMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "dungeonhubmusic": + dungeonHubMusic = !dungeonHubMusic; + CustomMusic.dungeonHub.stop(); + ConfigHandler.writeBooleanConfig("toggles", "DungeonHubMusic", dungeonHubMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom dungeon hub music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + dungeonHubMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "farmingislandsmusic": + farmingIslandsMusic = !farmingIslandsMusic; + CustomMusic.farmingIslands.stop(); + ConfigHandler.writeBooleanConfig("toggles", "FarmingIslandsMusic", farmingIslandsMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom farming islands music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + farmingIslandsMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "goldminemusic": + goldMineMusic = !goldMineMusic; + CustomMusic.goldMine.stop(); + ConfigHandler.writeBooleanConfig("toggles", "GoldMineMusic", goldMineMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom gold mine music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + goldMineMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "deepcavernsmusic": + deepCavernsMusic = !deepCavernsMusic; + CustomMusic.deepCaverns.stop(); + ConfigHandler.writeBooleanConfig("toggles", "DeepCavernsMusic", deepCavernsMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom deep caverns music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + deepCavernsMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "dwarvenminesmusic": + dwarvenMinesMusic = !dwarvenMinesMusic; + CustomMusic.dwarvenMines.stop(); + ConfigHandler.writeBooleanConfig("toggles", "DwarvenMinesMusic", dwarvenMinesMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom dwarven mines music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + dwarvenMinesMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "crystalhollowsmusic": + crystalHollowsMusic = !crystalHollowsMusic; + CustomMusic.crystalHollows.stop(); + ConfigHandler.writeBooleanConfig("toggles", "CrystalHollowsMusic", crystalHollowsMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom crystal hollows music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + crystalHollowsMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "spidersdenmusic": + spidersDenMusic = !spidersDenMusic; + CustomMusic.spidersDen.stop(); + ConfigHandler.writeBooleanConfig("toggles", "SpidersDenMusic", spidersDenMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom spider's den music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + spidersDenMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "blazingfortressmusic": + crimsonIsleMusic = !crimsonIsleMusic; + CustomMusic.crimsonIsle.stop(); + ConfigHandler.writeBooleanConfig("toggles", "CrimsonIsleMusic", crimsonIsleMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom crimson isle music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + crimsonIsleMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "endmusic": + endMusic = !endMusic; + CustomMusic.end.stop(); + ConfigHandler.writeBooleanConfig("toggles", "EndMusic", endMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom end music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + endMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "parkmusic": + parkMusic = !parkMusic; + CustomMusic.park.stop(); + ConfigHandler.writeBooleanConfig("toggles", "DungeonMusic", parkMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom park music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + parkMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "alert": + alerts = !alerts; + ConfigHandler.writeBooleanConfig("toggles", "Alerts", alerts); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Alerts has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + alerts + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "dungeonscore": + dungeonScore = !dungeonScore; + ConfigHandler.writeBooleanConfig("toggles", "DungeonScore", dungeonScore); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Dungeon score has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + dungeonScore + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "list": 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" + @@ -455,6 +617,7 @@ public class ToggleCommand extends CommandBase implements ICommand { 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 + " Prevent Placing FoT/Spirit Sceptre: " + DankersSkyblockMod.VALUE_COLOUR + flowerWeaponsToggled + "\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" + @@ -475,6 +638,7 @@ public class ToggleCommand extends CommandBase implements ICommand { 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 + " Creeper lines: " + DankersSkyblockMod.VALUE_COLOUR + creeperLinesToggled + "\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 + " Boulder puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + boulderToggled + "\n" + @@ -483,6 +647,7 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Watcher ready message: " + DankersSkyblockMod.VALUE_COLOUR + watcherReadyToggled + "\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 + "\n" + @@ -496,9 +661,30 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Giant HP display: " + DankersSkyblockMod.VALUE_COLOUR + giantHP + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Hide pet candy: " + DankersSkyblockMod.VALUE_COLOUR + hidePetCandy + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Highlight commissions: " + DankersSkyblockMod.VALUE_COLOUR + highlightCommissions + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom name colors: " + DankersSkyblockMod.VALUE_COLOUR + customColouredNames + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " End of farm alert: " + DankersSkyblockMod.VALUE_COLOUR + endOfFarmAlert + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Gemstone in lore: " + DankersSkyblockMod.VALUE_COLOUR + gemstoneLore + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Crystal Hollows waypoints: " + DankersSkyblockMod.VALUE_COLOUR + crystalHollowWaypoints + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Auto Crystal Hollows waypoints: " + DankersSkyblockMod.VALUE_COLOUR + crystalAutoWaypoints + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Auto accept reparty: " + DankersSkyblockMod.VALUE_COLOUR + autoAcceptReparty + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Ability cooldown display: " + DankersSkyblockMod.VALUE_COLOUR + abilityCooldowns + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Custom dungeon boss music: " + DankersSkyblockMod.VALUE_COLOUR + dungeonBossMusic + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Custom blood room music: " + DankersSkyblockMod.VALUE_COLOUR + bloodRoomMusic + "\n" + - DankersSkyblockMod.TYPE_COLOUR + " Custom dungeon music: " + DankersSkyblockMod.VALUE_COLOUR + dungeonMusic + DankersSkyblockMod.TYPE_COLOUR + " Custom dungeon music: " + DankersSkyblockMod.VALUE_COLOUR + dungeonMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom hub music: " + DankersSkyblockMod.VALUE_COLOUR + hubMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom island music: " + DankersSkyblockMod.VALUE_COLOUR + islandMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom dungeon hub music: " + DankersSkyblockMod.VALUE_COLOUR + dungeonHubMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom farming islands music: " + DankersSkyblockMod.VALUE_COLOUR + farmingIslandsMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom gold mine music: " + DankersSkyblockMod.VALUE_COLOUR + goldMineMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom deep caverns music: " + DankersSkyblockMod.VALUE_COLOUR + deepCavernsMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom dwarven mines music: " + DankersSkyblockMod.VALUE_COLOUR + dwarvenMinesMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom crystal hollows music: " + DankersSkyblockMod.VALUE_COLOUR + crystalHollowsMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom spider's den music: " + DankersSkyblockMod.VALUE_COLOUR + spidersDenMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom blazing fortress music: " + DankersSkyblockMod.VALUE_COLOUR + crimsonIsleMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom end music: " + DankersSkyblockMod.VALUE_COLOUR + endMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom park music: " + DankersSkyblockMod.VALUE_COLOUR + parkMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Alerts: " + DankersSkyblockMod.VALUE_COLOUR + alerts + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Dungeon score: " + DankersSkyblockMod.VALUE_COLOUR + dungeonScore )); break; default: diff --git a/src/main/java/me/Danker/commands/WeightCommand.java b/src/main/java/me/Danker/commands/WeightCommand.java new file mode 100644 index 0000000..ade909d --- /dev/null +++ b/src/main/java/me/Danker/commands/WeightCommand.java @@ -0,0 +1,265 @@ +package me.Danker.commands; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import me.Danker.DankersSkyblockMod; +import me.Danker.handlers.APIHandler; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; + +import java.text.NumberFormat; +import java.util.*; +import java.util.stream.Collectors; + +public class WeightCommand extends CommandBase { + + ArrayList<String> t12Minions = new ArrayList<>(Arrays.asList( + "WHEAT_12", + "CARROT_12", + "POTATO_12", + "PUMPKIN_12", + "MELON_12", + "MUSHROOM_12", + "COCOA_12", + "CACTUS_12", + "SUGAR_CANE_12", + "NETHER_WARTS_12" + )); + + @Override + public String getCommandName() { + return "weight"; + } + + @Override + public List<String> getCommandAliases() { + return Collections.singletonList("we"); + } + + @Override + public String getCommandUsage(ICommandSender arg0) { + return "/" + getCommandName() + " [name] [lily/farming]"; + } + + public static String usage(ICommandSender arg0) { + return new WeightCommand().getCommandUsage(arg0); + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { + if (args.length == 1) { + return Utils.getMatchingPlayers(args[0]); + } else if (args.length == 2) { + return getListOfStringsMatchingLastWord(args, "lily", "farming"); + } + return null; + } + + @Override + public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { + // MULTI THREAD DRIFTING + new Thread(() -> { + EntityPlayer player = (EntityPlayer) arg0; + + // Check key + String key = ConfigHandler.getString("api", "APIKey"); + if (key.equals("")) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + return; + } + + // Get UUID for Hypixel API requests + String username; + String uuid; + if (arg1.length == 0) { + username = player.getName(); + uuid = player.getUniqueID().toString().replaceAll("[\\-]", ""); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking weight of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); + } else { + username = arg1[0]; + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking weight of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); + uuid = APIHandler.getUUID(username); + } + + if (arg1.length < 2) { + System.out.println("Fetching weight from Senither API..."); + String weightURL = "https://hypixel-api.senither.com/v1/profiles/" + uuid + "/weight?key=" + key; + JsonObject weightResponse = APIHandler.getResponse(weightURL, true); + if (weightResponse.get("status").getAsInt() != 200) { + String reason = weightResponse.get("reason").getAsString(); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); + return; + } + + JsonObject data = weightResponse.get("data").getAsJsonObject(); + double weight = data.get("weight").getAsDouble(); + double overflow = data.get("weight_overflow").getAsDouble(); + double skillWeight = data.get("skills").getAsJsonObject().get("weight").getAsDouble(); + double skillOverflow = data.get("skills").getAsJsonObject().get("weight_overflow").getAsDouble(); + double slayerWeight = data.get("slayers").getAsJsonObject().get("weight").getAsDouble(); + double slayerOverflow = data.get("slayers").getAsJsonObject().get("weight_overflow").getAsDouble(); + double dungeonWeight = data.get("dungeons").getAsJsonObject().get("weight").getAsDouble(); + double dungeonOverflow = data.get("dungeons").getAsJsonObject().get("weight_overflow").getAsDouble(); + + NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.AQUA + " " + username + "'s Weight:\n" + + DankersSkyblockMod.TYPE_COLOUR + " Total Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(weight + overflow) + " (" + nf.format(weight) + " + " + nf.format(overflow) + ")\n" + + DankersSkyblockMod.TYPE_COLOUR + " Skill Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(skillWeight + skillOverflow) + " (" + nf.format(skillWeight) + " + " + nf.format(skillOverflow) + ")\n" + + DankersSkyblockMod.TYPE_COLOUR + " Slayers Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(slayerWeight + slayerOverflow) + " (" + nf.format(slayerWeight) + " + " + nf.format(slayerOverflow) + ")\n" + + DankersSkyblockMod.TYPE_COLOUR + " Dungeons Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(dungeonWeight + dungeonOverflow) + " (" + nf.format(dungeonWeight) + " + " + nf.format(dungeonOverflow) + ")\n" + + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); + } else if (arg1[1].equalsIgnoreCase("lily")) { + System.out.println("Fetching weight from Lily API..."); + String weightURL = "https://lily.antonio32a.com/" + uuid + "?key=" + key; + JsonObject weightResponse = APIHandler.getResponse(weightURL, true); + if (!weightResponse.get("success").getAsBoolean()) { + String reason = weightResponse.get("error").getAsString(); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); + return; + } + + JsonObject data = weightResponse.get("data").getAsJsonObject(); + double weight = data.get("total").getAsDouble(); + double skillWeight = data.get("skill").getAsJsonObject().get("base").getAsDouble(); + double skillOverflow = data.get("skill").getAsJsonObject().get("overflow").getAsDouble(); + double slayerWeight = data.get("slayer").getAsDouble(); + double catacombsXPWeight = data.get("catacombs").getAsJsonObject().get("experience").getAsDouble(); + double catacombsBaseWeight = data.get("catacombs").getAsJsonObject().get("completion").getAsJsonObject().get("base").getAsDouble(); + double catacombsMasterWeight = data.get("catacombs").getAsJsonObject().get("completion").getAsJsonObject().get("master").getAsDouble(); + + NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.AQUA + " " + username + "'s Weight (Lily):\n" + + DankersSkyblockMod.TYPE_COLOUR + " Total Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(weight) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Skill Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(skillWeight + skillOverflow) + " (" + nf.format(skillWeight) + " + " + nf.format(skillOverflow) + ")\n" + + DankersSkyblockMod.TYPE_COLOUR + " Slayers Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(slayerWeight) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Catacombs XP Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(catacombsXPWeight) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Catacombs Completion Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(catacombsBaseWeight) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Catacombs Master Completion Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(catacombsMasterWeight) + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); + } else if (arg1[1].equalsIgnoreCase("farming")) { + String latestProfile = APIHandler.getLatestProfileID(uuid, key); + if (latestProfile == null) return; + + String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; + System.out.println("Fetching profile..."); + JsonObject profileResponse = APIHandler.getResponse(profileURL, true); + if (!profileResponse.get("success").getAsBoolean()) { + String reason = profileResponse.get("cause").getAsString(); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); + return; + } + + JsonObject userObject = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject(); + + if (!userObject.has("collection")) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + username + " does not have collection API on.")); + return; + } + + JsonObject multipliers = DankersSkyblockMod.data.get("farmingWeight").getAsJsonObject(); + JsonObject collections = userObject.get("collection").getAsJsonObject(); + JsonObject jacob = userObject.has("jacob2") ? userObject.get("jacob2").getAsJsonObject() : null; + JsonArray minions = userObject.get("crafted_generators").getAsJsonArray(); + + // main weight + long wheatColl = collections.has("WHEAT") ? collections.get("WHEAT").getAsLong() < 0 ? collections.get("WHEAT").getAsLong() + 4294967294L : collections.get("WHEAT").getAsLong() : 0; + long carrotColl = collections.has("CARROT_ITEM") ? collections.get("CARROT_ITEM").getAsLong() < 0 ? collections.get("CARROT_ITEM").getAsLong() + 4294967294L : collections.get("CARROT_ITEM").getAsLong() : 0; + long potatoColl = collections.has("POTATO_ITEM") ? collections.get("POTATO_ITEM").getAsLong() < 0 ? collections.get("POTATO_ITEM").getAsLong() + 4294967294L : collections.get("POTATO_ITEM").getAsLong() : 0; + long pumpkinColl = collections.has("PUMPKIN") ? collections.get("PUMPKIN").getAsLong() < 0 ? collections.get("PUMPKIN").getAsLong() + 4294967294L : collections.get("PUMPKIN").getAsLong() : 0; + long melonColl = collections.has("MELON") ? collections.get("MELON").getAsLong() < 0 ? collections.get("MELON").getAsLong() + 4294967294L : collections.get("MELON").getAsLong() : 0; + long mushroomColl = collections.has("MUSHROOM_COLLECTION") ? collections.get("MUSHROOM_COLLECTION").getAsLong() < 0 ? collections.get("MUSHROOM_COLLECTION").getAsLong() + 4294967294L : collections.get("MUSHROOM_COLLECTION").getAsLong() : 0; + long cocoaColl = collections.has("INK_SACK:3") ? collections.get("INK_SACK:3").getAsLong() < 0 ? collections.get("INK_SACK:3").getAsLong() + 4294967294L : collections.get("INK_SACK:3").getAsLong() : 0; + long cactusColl = collections.has("CACTUS") ? collections.get("CACTUS").getAsLong() < 0 ? collections.get("CACTUS").getAsLong() + 4294967294L : collections.get("CACTUS").getAsLong() : 0; + long caneColl = collections.has("SUGAR_CANE") ? collections.get("SUGAR_CANE").getAsLong() < 0 ? collections.get("SUGAR_CANE").getAsLong() + 4294967294L : collections.get("SUGAR_CANE").getAsLong() : 0; + long wartColl = collections.has("NETHER_STALK") ? collections.get("NETHER_STALK").getAsLong() < 0 ? collections.get("NETHER_STALK").getAsLong() + 4294967294L : collections.get("NETHER_STALK").getAsLong() : 0; + + double wheatWeight = Math.round(wheatColl / multipliers.get("wheat").getAsDouble()) / 100D; + double carrotWeight = Math.round(carrotColl / multipliers.get("carrot").getAsDouble()) / 100D; + double potatoWeight = Math.round(potatoColl / multipliers.get("potato").getAsDouble()) / 100D; + double pumpkinWeight = Math.round(pumpkinColl / multipliers.get("pumpkin").getAsDouble()) / 100D; + double melonWeight = Math.round(melonColl / multipliers.get("melon").getAsDouble()) / 100D; + double mushroomWeight = Math.round(mushroomColl / multipliers.get("mushroom").getAsDouble()) / 100D; + double cocoaWeight = Math.round(cocoaColl / multipliers.get("cocoa").getAsDouble()) / 100D; + double cactusWeight = Math.round(cactusColl / multipliers.get("cactus").getAsDouble()) / 100D; + double caneWeight = Math.round(caneColl / multipliers.get("cane").getAsDouble()) / 100D; + double wartWeight = Math.round(wartColl / multipliers.get("wart").getAsDouble()) / 100D; + + // bonus weight + double farmingBonus = 0; + double anitaBonus = 0; + double medalBonus = 0; + double minionBonus = 0; + if (jacob != null) { + // farming cap + double farmingXP = userObject.get("experience_skill_farming").getAsDouble(); + int cap = jacob.get("perks").getAsJsonObject().has("farming_level_cap") ? jacob.get("perks").getAsJsonObject().get("farming_level_cap").getAsInt() : 0; + if (farmingXP > 111672425D && cap == 10) { + farmingBonus = 250D; + } else if (farmingXP > 55172425) { + farmingBonus = 100D; + } + + // anita bonus + anitaBonus = jacob.get("perks").getAsJsonObject().has("double_drops") ? jacob.get("perks").getAsJsonObject().get("double_drops").getAsInt() * 2D : 0; + + // gold medals + int totalGolds = 0; + List<String> contests = jacob.get("contests").getAsJsonObject().entrySet().stream() + .map(Map.Entry::getKey) + .collect(Collectors.toCollection(ArrayList::new)); + + // get total golds + for (String contest : contests) { + JsonObject contestData = jacob.get("contests").getAsJsonObject().get(contest).getAsJsonObject(); + if (contestData.has("claimed_position")) { + if (contestData.get("claimed_position").getAsInt() <= contestData.get("claimed_participants").getAsInt() * 0.05 + 1) totalGolds++; + } + } + + medalBonus = Math.floor(totalGolds / 50D) * 50D / 2D; + medalBonus = MathHelper.clamp_double(medalBonus, 0D, 500D); + } + + // t12 minions + for (JsonElement minion : minions) { + String minionName = minion.getAsString(); + if (t12Minions.contains(minionName)) minionBonus += 5; + } + + double mainWeight = Math.floor((wheatWeight + carrotWeight + potatoWeight + pumpkinWeight + melonWeight + mushroomWeight + cocoaWeight + cactusWeight + caneWeight + wartWeight) * 100D) / 100D; + double bonusWeight = farmingBonus + anitaBonus + medalBonus + minionBonus; + + NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.AQUA + username + "'s Weight (Farming):\n" + + DankersSkyblockMod.TYPE_COLOUR + "Total Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(mainWeight + bonusWeight) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + "Collection Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(mainWeight) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + "Bonus Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(bonusWeight) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + "Farming XP Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(farmingBonus) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + "Anita Bonus Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(anitaBonus) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + "Gold Medal Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(medalBonus) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + "Minion Weight: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(minionBonus) + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + EnumChatFormatting.BOLD + "-------------------")); + } else { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + } + }).start(); + } + +} |