From b89d16855374a3e75c4c1279226d23d923821084 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Sun, 22 Nov 2020 19:19:35 -0500 Subject: Add F7 tracker --- src/main/java/me/Danker/commands/DHelpCommand.java | 4 +- .../java/me/Danker/commands/DisplayCommand.java | 10 +++- src/main/java/me/Danker/commands/LootCommand.java | 68 +++++++++++++++++++++- .../java/me/Danker/commands/ResetLootCommand.java | 12 ++++ 4 files changed, 88 insertions(+), 6 deletions(-) (limited to 'src/main/java/me/Danker/commands') diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index b3bdbbf..4fadb54 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -37,8 +37,8 @@ public class DHelpCommand extends CommandBase { EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + EnumChatFormatting.AQUA + " - Sets API key.\n" + EnumChatFormatting.GOLD + " /getkey" + EnumChatFormatting.AQUA + " - Returns key set with /setkey and copies it to your clipboard.\n" + - EnumChatFormatting.GOLD + " /loot [winter/festival/spooky/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + - EnumChatFormatting.GOLD + " /display [winter/festival/spooky/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays winter sea creatures instead. /display auto automatically displays the loot for the slayer quest you have active.\n" + + EnumChatFormatting.GOLD + " /loot [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + + EnumChatFormatting.GOLD + " /display [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays winter sea creatures instead. /display auto automatically displays the loot for the slayer quest you have active.\n" + EnumChatFormatting.GOLD + " /resetloot " + EnumChatFormatting.AQUA + " - Resets loot for trackers. /resetloot confirm confirms the reset.\n" + EnumChatFormatting.GOLD + " /move " + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" + EnumChatFormatting.GOLD + " /scale " + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" + diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java index 2af402e..8ee18ec 100644 --- a/src/main/java/me/Danker/commands/DisplayCommand.java +++ b/src/main/java/me/Danker/commands/DisplayCommand.java @@ -22,7 +22,7 @@ public class DisplayCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " [winter/festival/spooky/session/f(1-6)]"; + return "/" + getCommandName() + " [winter/festival/spooky/session/f(1-7)]"; } @Override @@ -37,7 +37,7 @@ public class DisplayCommand extends CommandBase { } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { - return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6"); + return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6", "f7", "floor7"); } else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) { return getListOfStringsMatchingLastWord(args, "session"); } @@ -142,6 +142,12 @@ public class DisplayCommand extends CommandBase { } else { display = "catacombs_floor_six"; } + } else if (arg1[1].equalsIgnoreCase("f7") || arg1[1].equalsIgnoreCase("floor7")) { + if (showSession) { + display = "catacombs_floor_seven_session"; + } else { + display = "catacombs_floor_seven"; + } } else { player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /display catacombs ")); return; diff --git a/src/main/java/me/Danker/commands/LootCommand.java b/src/main/java/me/Danker/commands/LootCommand.java index a7c7ced..867139f 100644 --- a/src/main/java/me/Danker/commands/LootCommand.java +++ b/src/main/java/me/Danker/commands/LootCommand.java @@ -147,6 +147,19 @@ public class LootCommand extends CommandBase { public static int necroSwords; public static double f6CoinsSpent; public static double f6TimeSpent; + // F7 + public static int witherBloods; + public static int witherCloaks; + public static int implosions; + public static int witherShields; + public static int shadowWarps; + public static int autoRecombs; + public static int witherHelms; + public static int witherChests; + public static int witherLegs; + public static int witherBoots; + public static double f7CoinsSpent; + public static double f7TimeSpent; // Single sessions (No config saves) // Wolf @@ -281,6 +294,19 @@ public class LootCommand extends CommandBase { public static int necroSwordsSession = 0; public static double f6CoinsSpentSession = 0; public static double f6TimeSpentSession = 0; + // F7 + public static int witherBloodsSession = 0; + public static int witherCloaksSession = 0; + public static int implosionsSession = 0; + public static int witherShieldsSession = 0; + public static int shadowWarpsSession = 0; + public static int autoRecombsSession = 0; + public static int witherHelmsSession = 0; + public static int witherChestsSession = 0; + public static int witherLegsSession = 0; + public static int witherBootsSession = 0; + public static double f7CoinsSpentSession = 0; + public static double f7TimeSpentSession = 0; @Override public String getCommandName() { @@ -289,7 +315,7 @@ public class LootCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " [winter/festival/spooky/f(1-6)/session]"; + return "/" + getCommandName() + " [winter/festival/spooky/f(1-7)/session]"; } @Override @@ -304,7 +330,7 @@ public class LootCommand extends CommandBase { } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { - return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6"); + return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6", "f7", "floor7"); } else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) { return getListOfStringsMatchingLastWord(args, "session"); } @@ -860,6 +886,44 @@ public class LootCommand extends CommandBase { EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f6CoinsSpent) + "\n" + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f6TimeSpent) + "\n" + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); + } else if (arg1[1].equalsIgnoreCase("f7") || arg1[1].equalsIgnoreCase("floor7")) { + 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(recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Bloods: " + nf.format(witherBloodsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Cloaks: " + nf.format(witherCloaksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Implosions: " + nf.format(implosionsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Shields: " + nf.format(witherShieldsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Warps: " + nf.format(shadowWarpsSession) + "\n" + + EnumChatFormatting.GOLD + " Auto Recombobulator: " + nf.format(autoRecombsSession) + "\n" + + EnumChatFormatting.GOLD + " Wither Helmets: " + nf.format(witherHelmsSession) + "\n" + + EnumChatFormatting.GOLD + " Wither Chesplates: " + nf.format(witherChestsSession) + "\n" + + EnumChatFormatting.GOLD + " Wither Leggings: " + nf.format(witherLegsSession) + "\n" + + EnumChatFormatting.GOLD + " Wither Boots: " + nf.format(witherBootsSession) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f7CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, 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(recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Bloods: " + nf.format(witherBloods) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Cloaks: " + nf.format(witherCloaks) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Implosions: " + nf.format(implosions) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Wither Shields: " + nf.format(witherShields) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Shadow Warps: " + nf.format(shadowWarps) + "\n" + + EnumChatFormatting.GOLD + " Auto Recombobulator: " + nf.format(autoRecombs) + "\n" + + EnumChatFormatting.GOLD + " Wither Helmets: " + nf.format(witherHelms) + "\n" + + EnumChatFormatting.GOLD + " Wither Chesplates: " + nf.format(witherChests) + "\n" + + EnumChatFormatting.GOLD + " Wither Leggings: " + nf.format(witherLegs) + "\n" + + EnumChatFormatting.GOLD + " Wither Boots: " + nf.format(witherBoots) + "\n" + + EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f7CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f7TimeSpent) + "\n" + + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------")); } else { player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /loot catacombs ")); } diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java index f99b5ae..6e92c20 100644 --- a/src/main/java/me/Danker/commands/ResetLootCommand.java +++ b/src/main/java/me/Danker/commands/ResetLootCommand.java @@ -224,6 +224,18 @@ public class ResetLootCommand extends CommandBase { LootCommand.necroSwordsSession = 0; LootCommand.f6CoinsSpentSession = 0; LootCommand.f6TimeSpentSession = 0; + LootCommand.witherBloodsSession = 0; + LootCommand.witherCloaksSession = 0; + LootCommand.implosionsSession = 0; + LootCommand.witherShieldsSession = 0; + LootCommand.shadowWarpsSession = 0; + LootCommand.autoRecombsSession = 0; + LootCommand.witherHelmsSession = 0; + LootCommand.witherChestsSession = 0; + LootCommand.witherLegsSession = 0; + LootCommand.witherBootsSession = 0; + LootCommand.f7CoinsSpentSession = 0; + LootCommand.f7TimeSpentSession = 0; ConfigHandler.deleteCategory("catacombs"); ConfigHandler.reloadConfig(); } -- cgit