aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-11-26 16:10:11 -0500
committerGitHub <noreply@github.com>2020-11-26 16:10:11 -0500
commit016814851e46acdbc7a8fce44746eb67feef5905 (patch)
treeb39ca6496c233efe327dcdff0379f50b5cc6e243 /src/main/java/me/Danker/commands
parent292f5dde43c3e00b78e1d4e772ae336340b0a834 (diff)
parent16f1cd3c009184e8c8f5c75b9afae9ca531d2fee (diff)
downloadSkyblockMod-1.8.3.tar.gz
SkyblockMod-1.8.3.tar.bz2
SkyblockMod-1.8.3.zip
Merge pull request #30 from bowser0000/development
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r--src/main/java/me/Danker/commands/ArmourCommand.java34
-rw-r--r--src/main/java/me/Danker/commands/BankCommand.java31
-rw-r--r--src/main/java/me/Danker/commands/BlockSlayerCommand.java45
-rw-r--r--src/main/java/me/Danker/commands/ChatMaddoxCommand.java33
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java16
-rw-r--r--src/main/java/me/Danker/commands/DankerGuiCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/DisplayCommand.java203
-rw-r--r--src/main/java/me/Danker/commands/DungeonsCommand.java25
-rw-r--r--src/main/java/me/Danker/commands/GetkeyCommand.java13
-rw-r--r--src/main/java/me/Danker/commands/GuildOfCommand.java29
-rw-r--r--src/main/java/me/Danker/commands/ImportFishingCommand.java264
-rw-r--r--src/main/java/me/Danker/commands/LobbySkillsCommand.java40
-rw-r--r--src/main/java/me/Danker/commands/LootCommand.java1069
-rw-r--r--src/main/java/me/Danker/commands/MoveCommand.java95
-rw-r--r--src/main/java/me/Danker/commands/PetsCommand.java25
-rw-r--r--src/main/java/me/Danker/commands/ReloadConfigCommand.java7
-rw-r--r--src/main/java/me/Danker/commands/ResetLootCommand.java377
-rw-r--r--src/main/java/me/Danker/commands/ScaleCommand.java74
-rw-r--r--src/main/java/me/Danker/commands/SetkeyCommand.java9
-rw-r--r--src/main/java/me/Danker/commands/SkillTrackerCommand.java94
-rw-r--r--src/main/java/me/Danker/commands/SkillsCommand.java77
-rw-r--r--src/main/java/me/Danker/commands/SkyblockPlayersCommand.java47
-rw-r--r--src/main/java/me/Danker/commands/SlayerCommand.java29
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java301
24 files changed, 1674 insertions, 1265 deletions
diff --git a/src/main/java/me/Danker/commands/ArmourCommand.java b/src/main/java/me/Danker/commands/ArmourCommand.java
index 4fcd282..a10d75f 100644
--- a/src/main/java/me/Danker/commands/ArmourCommand.java
+++ b/src/main/java/me/Danker/commands/ArmourCommand.java
@@ -9,6 +9,7 @@ import java.util.List;
import com.google.gson.JsonObject;
+import me.Danker.TheMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -31,8 +32,7 @@ public class ArmourCommand extends CommandBase {
}
@Override
- public List<String> getCommandAliases()
- {
+ public List<String> getCommandAliases() {
return Collections.singletonList("armour");
}
@@ -58,12 +58,10 @@ public class ArmourCommand extends CommandBase {
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
// MULTI THREAD DRIFTING
new Thread(() -> {
- APIHandler ah = new APIHandler();
- ConfigHandler cf = new ConfigHandler();
EntityPlayer player = (EntityPlayer) arg0;
// Check key
- String key = cf.getString("api", "APIKey");
+ String key = ConfigHandler.getString("api", "APIKey");
if (key.equals("")) {
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
}
@@ -74,23 +72,23 @@ public class ArmourCommand extends CommandBase {
if (arg1.length == 0) {
username = player.getName();
uuid = player.getUniqueID().toString().replaceAll("[\\-]", "");
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking armour of " + EnumChatFormatting.DARK_GREEN + username));
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking armour of " + TheMod.SECONDARY_COLOUR + username));
} else {
username = arg1[0];
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking armour of " + EnumChatFormatting.DARK_GREEN + username));
- uuid = ah.getUUID(username);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking armour of " + TheMod.SECONDARY_COLOUR + username));
+ uuid = APIHandler.getUUID(username);
}
// Find stats of latest profile
- String latestProfile = ah.getLatestProfileID(uuid, key);
+ 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 = ah.getResponse(profileURL);
+ JsonObject profileResponse = APIHandler.getResponse(profileURL);
if (!profileResponse.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason));
return;
}
@@ -133,15 +131,15 @@ public class ArmourCommand extends CommandBase {
}
armourStream.close();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
EnumChatFormatting.AQUA + " " + username + "'s Armour:\n" +
- EnumChatFormatting.GREEN + " Helmet: " + helmet + "\n" +
- EnumChatFormatting.GREEN + " Chestplate: " + chest + "\n" +
- EnumChatFormatting.GREEN + " Leggings: " + legs + "\n" +
- EnumChatFormatting.GREEN + " Boots: " + boots + "\n" +
- EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------"));
+ TheMod.TYPE_COLOUR + " Helmet: " + helmet + "\n" +
+ TheMod.TYPE_COLOUR + " Chestplate: " + chest + "\n" +
+ TheMod.TYPE_COLOUR + " Leggings: " + legs + "\n" +
+ TheMod.TYPE_COLOUR + " Boots: " + boots + "\n" +
+ TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"));
} catch (IOException ex) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "An error has occurred while reading inventory data. See logs for more info."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "An error has occurred while reading inventory data. See logs for more info."));
System.err.println(ex);
}
}).start();
diff --git a/src/main/java/me/Danker/commands/BankCommand.java b/src/main/java/me/Danker/commands/BankCommand.java
index 0d9540c..6e2ddaa 100644
--- a/src/main/java/me/Danker/commands/BankCommand.java
+++ b/src/main/java/me/Danker/commands/BankCommand.java
@@ -7,6 +7,7 @@ import java.util.Locale;
import com.google.gson.JsonObject;
+import me.Danker.TheMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -52,12 +53,10 @@ public class BankCommand extends CommandBase {
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
// MULTI THREAD DRIFTING
new Thread(() -> {
- APIHandler ah = new APIHandler();
- ConfigHandler cf = new ConfigHandler();
EntityPlayer player = (EntityPlayer) arg0;
// Check key
- String key = cf.getString("api", "APIKey");
+ String key = ConfigHandler.getString("api", "APIKey");
if (key.equals("")) {
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
}
@@ -68,20 +67,20 @@ public class BankCommand extends CommandBase {
if (arg1.length == 0) {
username = player.getName();
uuid = player.getUniqueID().toString().replaceAll("[\\-]", "");
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking coins of " + EnumChatFormatting.DARK_GREEN + username));
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking coins of " + TheMod.SECONDARY_COLOUR + username));
} else {
username = arg1[0];
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking coins of " + EnumChatFormatting.DARK_GREEN + username));
- uuid = ah.getUUID(username);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking coins of " + TheMod.SECONDARY_COLOUR + username));
+ uuid = APIHandler.getUUID(username);
}
// Find stats of latest profile
- String latestProfile = ah.getLatestProfileID(uuid, key);
+ 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 = ah.getResponse(profileURL);
+ JsonObject profileResponse = APIHandler.getResponse(profileURL);
if (!profileResponse.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
@@ -98,17 +97,17 @@ public class BankCommand extends CommandBase {
double bankCoins = profileResponse.get("profile").getAsJsonObject().get("banking").getAsJsonObject().get("balance").getAsDouble();
bankCoins = (double) Math.floor(bankCoins * 100.0) / 100.0;
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
EnumChatFormatting.AQUA + " " + username + "'s Coins:\n" +
- EnumChatFormatting.GREEN + " Bank: " + EnumChatFormatting.GOLD + nf.format(bankCoins) + "\n" +
- EnumChatFormatting.GREEN + " Purse: " + EnumChatFormatting.GOLD + nf.format(purseCoins) + "\n" +
- EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------"));
+ TheMod.TYPE_COLOUR + " Bank: " + EnumChatFormatting.GOLD + nf.format(bankCoins) + "\n" +
+ TheMod.TYPE_COLOUR + " Purse: " + EnumChatFormatting.GOLD + nf.format(purseCoins) + "\n" +
+ TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"));
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
EnumChatFormatting.AQUA + " " + username + "'s Coins:\n" +
- EnumChatFormatting.GREEN + " Bank: " + EnumChatFormatting.RED + "Bank API disabled.\n" +
- EnumChatFormatting.GREEN + " Purse: " + EnumChatFormatting.GOLD + nf.format(purseCoins) + "\n" +
- EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------"));
+ TheMod.TYPE_COLOUR + " Bank: " + EnumChatFormatting.RED + "Bank API disabled.\n" +
+ TheMod.TYPE_COLOUR + " Purse: " + EnumChatFormatting.GOLD + nf.format(purseCoins) + "\n" +
+ TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"));
}
}).start();
}
diff --git a/src/main/java/me/Danker/commands/BlockSlayerCommand.java b/src/main/java/me/Danker/commands/BlockSlayerCommand.java
index 83a0358..d2144f6 100644
--- a/src/main/java/me/Danker/commands/BlockSlayerCommand.java
+++ b/src/main/java/me/Danker/commands/BlockSlayerCommand.java
@@ -2,6 +2,7 @@ package me.Danker.commands;
import java.util.List;
+import me.Danker.TheMod;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -9,7 +10,6 @@ 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;
public class BlockSlayerCommand extends CommandBase {
@@ -44,28 +44,31 @@ public class BlockSlayerCommand extends CommandBase {
@Override
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
final EntityPlayer player = (EntityPlayer)arg0;
- final ConfigHandler cf = new ConfigHandler();
if (arg1.length == 0 || (arg1.length == 1 && !arg1[0].equalsIgnoreCase("off"))) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
- if (arg1[0].equalsIgnoreCase("zombie")) {
- onlySlayerName = "Revenant Horror";
- } else if (arg1[0].equalsIgnoreCase("spider")) {
- onlySlayerName = "Tarantula Broodfather";
- } else if (arg1[0].equalsIgnoreCase("wolf")) {
- onlySlayerName = "Sven Packmaster";
- } else if (arg1[0].equalsIgnoreCase("off")) {
- onlySlayerName = "";
- onlySlayerNumber = "";
- cf.writeStringConfig("toggles", "BlockSlayer", "");
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Slayer blocking turned off."));
- return;
- } else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
- return;
+ switch (arg1[0].toLowerCase()) {
+ case "zombie":
+ onlySlayerName = "Revenant Horror";
+ break;
+ case "spider":
+ onlySlayerName = "Tarantula Broodfather";
+ break;
+ case "wolf":
+ onlySlayerName = "Sven Packmaster";
+ break;
+ case "off":
+ onlySlayerName = "";
+ onlySlayerNumber = "";
+ ConfigHandler.writeStringConfig("toggles", "BlockSlayer", "");
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Slayer blocking turned off."));
+ return;
+ default:
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
+ return;
}
int slayerNumber = Integer.parseInt(arg1[1]);
@@ -86,12 +89,12 @@ public class BlockSlayerCommand extends CommandBase {
default:
onlySlayerName = "";
onlySlayerNumber = "";
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
- cf.writeStringConfig("toggles", "BlockSlayer", onlySlayerName + " " + onlySlayerNumber);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Slayer blocking set to " + EnumChatFormatting.DARK_GREEN + onlySlayerName + " " + onlySlayerNumber));
+ ConfigHandler.writeStringConfig("toggles", "BlockSlayer", onlySlayerName + " " + onlySlayerNumber);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Slayer blocking set to " + TheMod.SECONDARY_COLOUR + onlySlayerName + " " + onlySlayerNumber));
}
}
diff --git a/src/main/java/me/Danker/commands/ChatMaddoxCommand.java b/src/main/java/me/Danker/commands/ChatMaddoxCommand.java
deleted file mode 100644
index 518f26f..0000000
--- a/src/main/java/me/Danker/commands/ChatMaddoxCommand.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package me.Danker.commands;
-
-import me.Danker.TheMod;
-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;
-
-public class ChatMaddoxCommand extends CommandBase {
-
- @Override
- public String getCommandName() {
- return "dmodopenmaddoxmenu";
- }
-
- @Override
- public String getCommandUsage(ICommandSender arg0) {
- return null;
- }
-
- @Override
- public int getRequiredPermissionLevel() {
- return 0;
- }
-
- @Override
- public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
- if (!ToggleCommand.chatMaddoxToggled) return;
- Minecraft.getMinecraft().thePlayer.sendChatMessage(TheMod.lastMaddoxCommand);
- }
-
-}
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index c4fd618..9d9bb51 100644
--- a/src/main/java/me/Danker/commands/DHelpCommand.java
+++ b/src/main/java/me/Danker/commands/DHelpCommand.java
@@ -34,14 +34,14 @@ public class DHelpCommand extends CommandBase {
EnumChatFormatting.GOLD + " Commands, " + EnumChatFormatting.GREEN + " Keybinds.\n" +
EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" +
EnumChatFormatting.GOLD + " /dsm" + EnumChatFormatting.AQUA + " - Opens the GUI for Danker's Skyblock Mod.\n" +
- EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/threemanpuzzle/midasstaffmessages/lividsolver/oruopuzzle/blazepuzzle/creeperpuzzle/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
+ EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/threemanpuzzle/midasstaffmessages/healmessages/caketimer/lowhealthnotify/lividsolver/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
EnumChatFormatting.GOLD + " /setkey <key>" + EnumChatFormatting.AQUA + " - Sets API key.\n" +
EnumChatFormatting.GOLD + " /getkey" + EnumChatFormatting.AQUA + " - Returns key set with /setkey and copies it to your clipboard.\n" +
- EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs> [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 <zombie/spider/wolf/fishing/catacombs/auto/off> [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 + " /resetloot <zombie/spider/wolf/fishing/catacombs/confirm/cancel>" + EnumChatFormatting.AQUA + " - Resets loot for trackers. /resetloot confirm confirms the reset.\n" +
- EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50/lividhp> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" +
- EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50/lividhp> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" +
+ EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs/mythological/> [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" +
+ EnumChatFormatting.GOLD + " /display <zombie/spider/wolf/fishing/catacombs/mythological/auto/off> [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays winter sea creatures instead. /display auto automatically displays the loot for the slayer quest you have active.\n" +
+ EnumChatFormatting.GOLD + " /resetloot <zombie/spider/wolf/fishing/catacombs/mythological/confirm/cancel>" + EnumChatFormatting.AQUA + " - Resets loot for trackers. /resetloot confirm confirms the reset.\n" +
+ EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" +
+ EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" +
EnumChatFormatting.GOLD + " /slayer [player]" + EnumChatFormatting.AQUA + " - Uses API to get slayer xp of a person. If no name is provided, it checks yours.\n" +
EnumChatFormatting.GOLD + " /skills [player]" + EnumChatFormatting.AQUA + " - Uses API to get skill levels of a person. If no name is provided, it checks yours.\n" +
EnumChatFormatting.GOLD + " /lobbyskills" + EnumChatFormatting.AQUA + " - Uses API to find the average skills of the lobby, as well the three players with the highest skill average.\n" +
@@ -53,7 +53,9 @@ public class DHelpCommand extends CommandBase {
EnumChatFormatting.GOLD + " /importfishing" + EnumChatFormatting.AQUA + " - Imports your fishing stats from your latest profile to your fishing tracker using the API.\n" +
EnumChatFormatting.GOLD + " /sbplayers" + EnumChatFormatting.AQUA + " - Uses API to find how many players are on each Skyblock island.\n" +
EnumChatFormatting.GOLD + " /onlyslayer <zombie/spider/wolf> <1/2/3/4>" + EnumChatFormatting.AQUA + " - Stops you from starting a slayer quest other than the one specified.\n" +
- EnumChatFormatting.GREEN + " Open Maddox Menu" + EnumChatFormatting.AQUA + " - M by default.\n"));
+ EnumChatFormatting.GOLD + " /skilltracker <start/stop/reset>" + EnumChatFormatting.AQUA + " - Text display for skill xp/hour.\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 ef39d24..3616849 100644
--- a/src/main/java/me/Danker/commands/DankerGuiCommand.java
+++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java
@@ -1,8 +1,6 @@
package me.Danker.commands;
import me.Danker.TheMod;
-import me.Danker.gui.DankerGui;
-import net.minecraft.client.Minecraft;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java
index ee4422f..1cd8c80 100644
--- a/src/main/java/me/Danker/commands/DisplayCommand.java
+++ b/src/main/java/me/Danker/commands/DisplayCommand.java
@@ -2,6 +2,7 @@ package me.Danker.commands;
import java.util.List;
+import me.Danker.TheMod;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -9,7 +10,6 @@ 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;
public class DisplayCommand extends CommandBase {
public static String display;
@@ -22,7 +22,7 @@ public class DisplayCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/auto/off> [winter/festival/spooky/session/f(1-6)]";
+ return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/mythological/auto/off> [winter/festival/spooky/session/f(1-7)]";
}
@Override
@@ -33,11 +33,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", "auto", "off");
+ return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "mythological", "auto", "off");
} 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");
}
@@ -49,51 +49,65 @@ public class DisplayCommand extends CommandBase {
final EntityPlayer player = (EntityPlayer) arg0;
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
- final ConfigHandler cf = new ConfigHandler();
boolean showSession = false;
if (arg1[arg1.length - 1].equalsIgnoreCase("session")) showSession = true;
- if (arg1[0].equalsIgnoreCase("wolf")) {
+ switch (arg1[0].toLowerCase()) {
+ case "wolf":
if (showSession) {
display = "wolf_session";
} else {
display = "wolf";
}
- } else if (arg1[0].equalsIgnoreCase("spider")) {
+ break;
+ case "spider":
if (showSession) {
display = "spider_session";
} else {
display = "spider";
}
- } else if (arg1[0].equalsIgnoreCase("zombie")) {
+ case "zombie":
if (showSession) {
display = "zombie_session";
} else {
display = "zombie";
}
- } else if (arg1[0].equalsIgnoreCase("fishing")) {
- if (arg1.length > 1 && arg1[1].equalsIgnoreCase("winter")) {
- if (showSession) {
- display = "fishing_winter_session";
- } else {
- display = "fishing_winter";
- }
- } else if (arg1.length > 1 && arg1[1].equalsIgnoreCase("festival")) {
- if (showSession) {
- display = "fishing_festival_session";
- } else {
- display = "fishing_festival";
- }
- } else if (arg1.length > 1 && arg1[1].equalsIgnoreCase("spooky")) {
- if (showSession) {
- display = "spooky_fishing_session";
- } else {
- display = "spooky_fishing";
+ break;
+ case "fishing":
+ if (arg1.length > 1) {
+ switch (arg1[1].toLowerCase()) {
+ case "winter":
+ if (showSession) {
+ display = "fishing_winter_session";
+ } else {
+ display = "fishing_winter";
+ }
+ break;
+ case "festival":
+ if (showSession) {
+ display = "fishing_festival_session";
+ } else {
+ display = "fishing_festival";
+ }
+ break;
+ case "spooky":
+ if (showSession) {
+ display = "fishing_spooky_session";
+ } else {
+ display = "fishing_spooky";
+ }
+ break;
+ default:
+ if (showSession) {
+ display = "fishing_session";
+ } else {
+ display = "fishing";
+ }
}
} else {
if (showSession) {
@@ -101,67 +115,100 @@ public class DisplayCommand extends CommandBase {
} else {
display = "fishing";
}
- }
- } else if (arg1[0].equalsIgnoreCase("catacombs")) {
- if (arg1.length == 1) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /display catacombs <f1/f2/f3/f4>"));
- return;
}
- if (arg1[1].equalsIgnoreCase("f1") || arg1[1].equalsIgnoreCase("floor1")) {
- if (showSession) {
- display = "catacombs_floor_one_session";
- } else {
- display = "catacombs_floor_one";
- }
- } else if (arg1[1].equalsIgnoreCase("f2") || arg1[1].equalsIgnoreCase("floor2")) {
- if (showSession) {
- display = "catacombs_floor_two_session";
- } else {
- display = "catacombs_floor_two";
- }
- } else if (arg1[1].equalsIgnoreCase("f3") || arg1[1].equalsIgnoreCase("floor3")) {
- if (showSession) {
- display = "catacombs_floor_three_session";
- } else {
- display = "catacombs_floor_three";
- }
- } else if (arg1[1].equalsIgnoreCase("f4") || arg1[1].equalsIgnoreCase("floor4")) {
- if (showSession) {
- display = "catacombs_floor_four_session";
- } else {
- display = "catacombs_floor_four";
- }
- } else if (arg1[1].equalsIgnoreCase("f5") || arg1[1].equalsIgnoreCase("floor5")) {
- if (showSession) {
- display = "catacombs_floor_five_session";
- } else {
- display = "catacombs_floor_five";
- }
- } else if (arg1[1].equalsIgnoreCase("f6") || arg1[1].equalsIgnoreCase("floor6")) {
- if (showSession) {
- display = "catacombs_floor_six_session";
- } else {
- display = "catacombs_floor_six";
- }
+ break;
+ case "mythological":
+ if (showSession) {
+ display = "mythological_session";
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /display catacombs <f1/f2/f3/f4/f5/f6>"));
+ display = "mythological";
+ }
+ break;
+ case "catacombs":
+ if (arg1.length == 1) {
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /display catacombs <f1/f2/f3/f4f5/f6/f7>"));
return;
}
- } else if (arg1[0].equalsIgnoreCase("auto")) {
+
+ switch (arg1[1].toLowerCase()) {
+ case "f1":
+ case "floor1":
+ if (showSession) {
+ display = "catacombs_floor_one_session";
+ } else {
+ display = "catacombs_floor_one";
+ }
+ break;
+ case "f2":
+ case "floor2":
+ if (showSession) {
+ display = "catacombs_floor_two_session";
+ } else {
+ display = "catacombs_floor_two";
+ }
+ break;
+ case "f3":
+ case "floor3":
+ if (showSession) {
+ display = "catacombs_floor_three_session";
+ } else {
+ display = "catacombs_floor_three";
+ }
+ break;
+ case "f4":
+ case "floor4":
+ if (showSession) {
+ display = "catacombs_floor_four_session";
+ } else {
+ display = "catacombs_floor_four";
+ }
+ break;
+ case "f5":
+ case "floor5":
+ if (showSession) {
+ display = "catacombs_floor_five_session";
+ } else {
+ display = "catacombs_floor_five";
+ }
+ break;
+ case "f6":
+ case "floor6":
+ if (showSession) {
+ display = "catacombs_floor_six_session";
+ } else {
+ display = "catacombs_floor_six";
+ }
+ break;
+ case "f7":
+ case "floor7":
+ if (showSession) {
+ display = "catacombs_floor_seven_session";
+ } else {
+ display = "catacombs_floor_seven";
+ }
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /display catacombs <f1/f2/f3/f4/f5/f6/f7>"));
+ return;
+ }
+ break;
+ case "auto":
auto = true;
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Display set to " + EnumChatFormatting.DARK_GREEN + "auto" + EnumChatFormatting.GREEN + "."));
- cf.writeBooleanConfig("misc", "autoDisplay", true);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Display set to " + TheMod.SECONDARY_COLOUR + "auto" + TheMod.MAIN_COLOUR + "."));
+ ConfigHandler.writeBooleanConfig("misc", "autoDisplay", true);
return;
- } else if (arg1[0].equalsIgnoreCase("off")) {
+ case "off":
display = "off";
- } else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
+
auto = false;
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Display set to " + EnumChatFormatting.DARK_GREEN + display + EnumChatFormatting.GREEN + "."));
- cf.writeBooleanConfig("misc", "autoDisplay", false);
- cf.writeStringConfig("misc", "display", display);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Display set to " + TheMod.SECONDARY_COLOUR + display + TheMod.MAIN_COLOUR + "."));
+ ConfigHandler.writeBooleanConfig("misc", "autoDisplay", false);
+ ConfigHandler.writeStringConfig("misc", "display", display);
}
}
diff --git a/src/main/java/me/Danker/commands/DungeonsCommand.java b/src/main/java/me/Danker/commands/DungeonsCommand.java
index 251cf3d..4b8c126 100644
--- a/src/main/java/me/Danker/commands/DungeonsCommand.java
+++ b/src/main/java/me/Danker/commands/DungeonsCommand.java
@@ -4,6 +4,7 @@ import java.util.List;
import com.google.gson.JsonObject;
+import me.Danker.TheMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -44,14 +45,12 @@ public class DungeonsCommand extends CommandBase {
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
// MULTI THREAD DRIFTING
new Thread(() -> {
- APIHandler ah = new APIHandler();
- ConfigHandler cf = new ConfigHandler();
EntityPlayer player = (EntityPlayer) arg0;
// Check key
- String key = cf.getString("api", "APIKey");
+ String key = ConfigHandler.getString("api", "APIKey");
if (key.equals("")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey."));
}
// Get UUID for Hypixel API requests
@@ -60,30 +59,30 @@ public class DungeonsCommand extends CommandBase {
if (arg1.length == 0) {
username = player.getName();
uuid = player.getUniqueID().toString().replaceAll("[\\-]", "");
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking dungeon stats of " + EnumChatFormatting.DARK_GREEN + username));
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking dungeon stats of " + TheMod.SECONDARY_COLOUR + username));
} else {
username = arg1[0];
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking dungeon stats of " + EnumChatFormatting.DARK_GREEN + username));
- uuid = ah.getUUID(username);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking dungeon stats of " + TheMod.SECONDARY_COLOUR + username));
+ uuid = APIHandler.getUUID(username);
}
// Find stats of latest profile
- String latestProfile = ah.getLatestProfileID(uuid, key);
+ 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 = ah.getResponse(profileURL);
+ JsonObject profileResponse = APIHandler.getResponse(profileURL);
if (!profileResponse.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason));
return;
}
System.out.println("Fetching 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(EnumChatFormatting.RED + "This player has not played dungeons."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "This player has not played dungeons."));
return;
}
@@ -95,7 +94,7 @@ public class DungeonsCommand extends CommandBase {
double tank = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("tank").getAsJsonObject().get("experience").getAsDouble());
String selectedClass = Utils.capitalizeString(dungeonsObject.get("selected_dungeon_class").getAsString());
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
EnumChatFormatting.RED + " Catacombs Level: " + catacombs + "\n" +
EnumChatFormatting.GOLD + " Selected Class: " + selectedClass + "\n\n" +
EnumChatFormatting.YELLOW + " Healer Level: " + healer + "\n" +
@@ -103,7 +102,7 @@ public class DungeonsCommand extends CommandBase {
EnumChatFormatting.RED + " Berserk Level: " + berserk + "\n" +
EnumChatFormatting.GREEN + " Archer Level: " + archer + "\n" +
EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n" +
- EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------"));
+ TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"));
}).start();
}
diff --git a/src/main/java/me/Danker/commands/GetkeyCommand.java b/src/main/java/me/Danker/commands/GetkeyCommand.java
index 8a650de..e7dd051 100644
--- a/src/main/java/me/Danker/commands/GetkeyCommand.java
+++ b/src/main/java/me/Danker/commands/GetkeyCommand.java
@@ -4,6 +4,7 @@ import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
+import me.Danker.TheMod;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -11,7 +12,6 @@ import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
public class GetkeyCommand extends CommandBase implements ICommand {
@@ -33,17 +33,16 @@ public class GetkeyCommand extends CommandBase implements ICommand {
@Override
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
EntityPlayer player = (EntityPlayer)arg0;
- ConfigHandler cf = new ConfigHandler();
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
- StringSelection stringSelection = new StringSelection(cf.getString("api", "APIKey"));
+ StringSelection stringSelection = new StringSelection(ConfigHandler.getString("api", "APIKey"));
- if (cf.getString("api", "APIKey").equals("")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Set your API key using /setkey."));
+ if (ConfigHandler.getString("api", "APIKey").equals("")) {
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Set your API key using /setkey."));
}
clipboard.setContents(stringSelection, null);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Your set API key is " + EnumChatFormatting.DARK_GREEN + cf.getString("api", "APIKey") + "\n" +
- EnumChatFormatting.GREEN + "Your set API key has been copied to the clipboard."));
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Your set API key is " + TheMod.SECONDARY_COLOUR + ConfigHandler.getString("api", "APIKey") + "\n" +
+ TheMod.MAIN_COLOUR + " Your set API key has been copied to the clipboard."));
}
diff --git a/src/main/java/me/Danker/commands/GuildOfCommand.java b/src/main/java/me/Danker/commands/GuildOfCommand.java
index be804c1..881a9c4 100644
--- a/src/main/java/me/Danker/commands/GuildOfCommand.java
+++ b/src/main/java/me/Danker/commands/GuildOfCommand.java
@@ -6,6 +6,7 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
+import me.Danker.TheMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -46,14 +47,12 @@ public class GuildOfCommand extends CommandBase {
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
// MULTI THREAD DRIFTING
new Thread(() -> {
- APIHandler ah = new APIHandler();
- ConfigHandler cf = new ConfigHandler();
EntityPlayer player = (EntityPlayer) arg0;
// Check key
- String key = cf.getString("api", "APIKey");
+ String key = ConfigHandler.getString("api", "APIKey");
if (key.equals("")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey."));
}
// Get UUID for Hypixel API requests
@@ -62,20 +61,20 @@ public class GuildOfCommand extends CommandBase {
if (arg1.length == 0) {
username = player.getName();
uuid = player.getUniqueID().toString().replaceAll("[\\-]", "");
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking guild of " + EnumChatFormatting.DARK_GREEN + username));
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking guild of " + TheMod.SECONDARY_COLOUR + username));
} else {
username = arg1[0];
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking guild of " + EnumChatFormatting.DARK_GREEN + username));
- uuid = ah.getUUID(username);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking guild of " + TheMod.SECONDARY_COLOUR + username));
+ uuid = APIHandler.getUUID(username);
}
// Find guild ID
System.out.println("Fetching guild...");
String guildURL = "https://api.hypixel.net/guild?player=" + uuid + "&key=" + key;
- JsonObject guildResponse = ah.getResponse(guildURL);
+ JsonObject guildResponse = APIHandler.getResponse(guildURL);
if (!guildResponse.get("success").getAsBoolean()) {
String reason = guildResponse.get("cause").getAsString();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason));
return;
}
@@ -99,7 +98,7 @@ public class GuildOfCommand extends CommandBase {
// Get username from UUID
String gmUUID = memberObject.get("uuid").getAsString();
String gmNameURL = "https://api.mojang.com/user/profiles/" + gmUUID + "/names";
- JsonArray gmNameResponse = ah.getArrayResponse(gmNameURL);
+ JsonArray gmNameResponse = APIHandler.getArrayResponse(gmNameURL);
guildMaster = gmNameResponse.get(gmNameResponse.size() - 1).getAsJsonObject().get("name").getAsString();
break;
@@ -107,12 +106,12 @@ public class GuildOfCommand extends CommandBase {
}
}
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
EnumChatFormatting.AQUA + " " + username + "'s Guild:\n" +
- EnumChatFormatting.GREEN + " Guild: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + guildName + "\n" +
- EnumChatFormatting.GREEN + " Guildmaster: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + guildMaster + "\n" +
- EnumChatFormatting.GREEN + " Members: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + players + "\n" +
- EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------"));
+ TheMod.TYPE_COLOUR + " Guild: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + guildName + "\n" +
+ TheMod.TYPE_COLOUR + " Guildmaster: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + guildMaster + "\n" +
+ TheMod.TYPE_COLOUR + " Members: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + players + "\n" +
+ TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"));
}).start();
}
diff --git a/src/main/java/me/Danker/commands/ImportFishingCommand.java b/src/main/java/me/Danker/commands/ImportFishingCommand.java
index 9376a8d..734a561 100644
--- a/src/main/java/me/Danker/commands/ImportFishingCommand.java
+++ b/src/main/java/me/Danker/commands/ImportFishingCommand.java
@@ -2,6 +2,7 @@ package me.Danker.commands;
import com.google.gson.JsonObject;
+import me.Danker.TheMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
@@ -9,7 +10,6 @@ import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
public class ImportFishingCommand extends CommandBase {
@@ -32,229 +32,261 @@ public class ImportFishingCommand extends CommandBase {
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
// MULTI THREAD DRIFTING
new Thread(() -> {
- APIHandler ah = new APIHandler();
- LootCommand lc = new LootCommand();
- ConfigHandler cf = new ConfigHandler();
EntityPlayer player = (EntityPlayer) arg0;
// Check key
- String key = cf.getString("api", "APIKey");
+ String key = ConfigHandler.getString("api", "APIKey");
if (key.equals("")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey."));
}
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Importing your fishing stats..."));
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Importing your fishing stats..."));
// Get UUID for Hypixel API requests
String username = player.getName();
String uuid = player.getUniqueID().toString().replaceAll("[\\-]", "");
- String latestProfile = ah.getLatestProfileID(uuid, key);
+ 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 = ah.getResponse(profileURL);
+ JsonObject profileResponse = APIHandler.getResponse(profileURL);
if (!profileResponse.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason));
return;
}
System.out.println("Fetching fishing stats...");
JsonObject statsObject = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject().get("stats").getAsJsonObject();
- lc.greatCatches = 0;
- lc.goodCatches = 0;
+ LootCommand.greatCatches = 0;
+ LootCommand.goodCatches = 0;
if (statsObject.has("items_fished_treasure")) {
if (statsObject.has("items_fished_large_treasure")) {
- lc.greatCatches = statsObject.get("items_fished_large_treasure").getAsInt();
- lc.goodCatches = statsObject.get("items_fished_treasure").getAsInt() - lc.greatCatches;
+ LootCommand.greatCatches = statsObject.get("items_fished_large_treasure").getAsInt();
+ LootCommand.goodCatches = statsObject.get("items_fished_treasure").getAsInt() - LootCommand.greatCatches;
} else {
- lc.goodCatches = statsObject.get("items_fished_treasure").getAsInt();
+ LootCommand.goodCatches = statsObject.get("items_fished_treasure").getAsInt();
}
}
- lc.seaCreatures = 0;
- lc.squids = 0;
+ LootCommand.seaCreatures = 0;
+ LootCommand.squids = 0;
if (statsObject.has("kills_pond_squid")) {
- lc.squids = statsObject.get("kills_pond_squid").getAsInt();
+ LootCommand.squids = statsObject.get("kills_pond_squid").getAsInt();
}
- lc.seaCreatures += lc.squids;
+ LootCommand.seaCreatures += LootCommand.squids;
- lc.seaWalkers = 0;
+ LootCommand.seaWalkers = 0;
if (statsObject.has("kills_sea_walker")) {
- lc.seaWalkers = statsObject.get("kills_sea_walker").getAsInt();
+ LootCommand.seaWalkers = statsObject.get("kills_sea_walker").getAsInt();
}
- lc.seaCreatures += lc.seaWalkers;
+ LootCommand.seaCreatures += LootCommand.seaWalkers;
- lc.nightSquids = 0;
+ LootCommand.nightSquids = 0;
if (statsObject.has("kills_night_squid")) {
- lc.nightSquids = statsObject.get("kills_night_squid").getAsInt();
+ LootCommand.nightSquids = statsObject.get("kills_night_squid").getAsInt();
}
- lc.seaCreatures += lc.nightSquids;
+ LootCommand.seaCreatures += LootCommand.nightSquids;
- lc.seaGuardians = 0;
+ LootCommand.seaGuardians = 0;
if (statsObject.has("kills_sea_guardian")) {
- lc.seaGuardians = statsObject.get("kills_sea_guardian").getAsInt();
+ LootCommand.seaGuardians = statsObject.get("kills_sea_guardian").getAsInt();
}
- lc.seaCreatures += lc.seaGuardians;
+ LootCommand.seaCreatures += LootCommand.seaGuardians;
- lc.seaWitches = 0;
+ LootCommand.seaWitches = 0;
if (statsObject.has("kills_sea_witch")) {
- lc.seaWitches = statsObject.get("kills_sea_witch").getAsInt();
+ LootCommand.seaWitches = statsObject.get("kills_sea_witch").getAsInt();
}
- lc.seaCreatures += lc.seaWitches;
+ LootCommand.seaCreatures += LootCommand.seaWitches;
- lc.seaArchers = 0;
+ LootCommand.seaArchers = 0;
if (statsObject.has("kills_sea_archer")) {
- lc.seaArchers = statsObject.get("kills_sea_archer").getAsInt();
+ LootCommand.seaArchers = statsObject.get("kills_sea_archer").getAsInt();
}
- lc.seaCreatures += lc.seaArchers;
+ LootCommand.seaCreatures += LootCommand.seaArchers;
- lc.monsterOfTheDeeps = 0;
+ LootCommand.monsterOfTheDeeps = 0;
if (statsObject.has("kills_zombie_deep")) {
if (statsObject.has("kills_chicken_deep")) {
- lc.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt() + statsObject.get("kills_chicken_deep").getAsInt();
+ LootCommand.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt() + statsObject.get("kills_chicken_deep").getAsInt();
} else {
- lc.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt();
+ LootCommand.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt();
}
} else if (statsObject.has("kills_chicken_deep")) {
- lc.monsterOfTheDeeps = statsObject.get("kills_chicken_deep").getAsInt();
+ LootCommand.monsterOfTheDeeps = statsObject.get("kills_chicken_deep").getAsInt();
}
- lc.seaCreatures += lc.monsterOfTheDeeps;
+ LootCommand.seaCreatures += LootCommand.monsterOfTheDeeps;
- lc.catfishes = 0;
+ LootCommand.catfishes = 0;
if (statsObject.has("kills_catfish")) {
- lc.catfishes = statsObject.get("kills_catfish").getAsInt();
+ LootCommand.catfishes = statsObject.get("kills_catfish").getAsInt();
}
- lc.seaCreatures += lc.catfishes;
+ LootCommand.seaCreatures += LootCommand.catfishes;
- lc.carrotKings = 0;
+ LootCommand.carrotKings = 0;
if (statsObject.has("kills_carrot_king")) {
- lc.carrotKings = statsObject.get("kills_carrot_king").getAsInt();
+ LootCommand.carrotKings = statsObject.get("kills_carrot_king").getAsInt();
}
- lc.seaCreatures += lc.carrotKings;
+ LootCommand.seaCreatures += LootCommand.carrotKings;
- lc.seaLeeches = 0;
+ LootCommand.seaLeeches = 0;
if (statsObject.has("kills_sea_leech")) {
- lc.seaLeeches = statsObject.get("kills_sea_leech").getAsInt();
+ LootCommand.seaLeeches = statsObject.get("kills_sea_leech").getAsInt();
}
- lc.seaCreatures += lc.seaLeeches;
+ LootCommand.seaCreatures += LootCommand.seaLeeches;
- lc.guardianDefenders = 0;
+ LootCommand.guardianDefenders = 0;
if (statsObject.has("kills_guardian_defender")) {
- lc.guardianDefenders = statsObject.get("kills_guardian_defender").getAsInt();
+ LootCommand.guardianDefenders = statsObject.get("kills_guardian_defender").getAsInt();
}
- lc.seaCreatures += lc.guardianDefenders;
+ LootCommand.seaCreatures += LootCommand.guardianDefenders;
- lc.deepSeaProtectors = 0;
+ LootCommand.deepSeaProtectors = 0;
if (statsObject.has("kills_deep_sea_protector")) {
- lc.deepSeaProtectors = statsObject.get("kills_deep_sea_protector").getAsInt();
+ LootCommand.deepSeaProtectors = statsObject.get("kills_deep_sea_protector").getAsInt();
}
- lc.seaCreatures += lc.deepSeaProtectors;
+ LootCommand.seaCreatures += LootCommand.deepSeaProtectors;
- lc.hydras = 0;
+ LootCommand.hydras = 0;
if (statsObject.has("kills_water_hydra")) {
// Hydra splits
- lc.hydras = statsObject.get("kills_water_hydra").getAsInt() / 2;
+ LootCommand.hydras = statsObject.get("kills_water_hydra").getAsInt() / 2;
}
- lc.seaCreatures += lc.hydras;
+ LootCommand.seaCreatures += LootCommand.hydras;
- lc.seaEmperors = 0;
+ LootCommand.seaEmperors = 0;
if (statsObject.has("kills_skeleton_emperor")) {
if (statsObject.has("kills_guardian_emperor")) {
- lc.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt() + statsObject.get("kills_guardian_emperor").getAsInt();
+ LootCommand.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt() + statsObject.get("kills_guardian_emperor").getAsInt();
} else {
- lc.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt();
+ LootCommand.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt();
}
} else if (statsObject.has("kills_guardian_emperor")) {
- lc.seaEmperors = statsObject.get("kills_guardian_emperor").getAsInt();
+ LootCommand.seaEmperors = statsObject.get("kills_guardian_emperor").getAsInt();
}
- lc.seaCreatures += lc.seaEmperors;
+ LootCommand.seaCreatures += LootCommand.seaEmperors;
- lc.fishingMilestone = 0;
+ LootCommand.fishingMilestone = 0;
if (statsObject.has("pet_milestone_sea_creatures_killed")) {
- lc.fishingMilestone = statsObject.get("pet_milestone_sea_creatures_killed").getAsInt();
+ LootCommand.fishingMilestone = statsObject.get("pet_milestone_sea_creatures_killed").getAsInt();
}
- lc.frozenSteves = 0;
+ LootCommand.frozenSteves = 0;
if (statsObject.has("kills_frozen_steve")) {
- lc.frozenSteves = statsObject.get("kills_frozen_steve").getAsInt();
+ LootCommand.frozenSteves = statsObject.get("kills_frozen_steve").getAsInt();
}
- lc.seaCreatures += lc.frozenSteves;
+ LootCommand.seaCreatures += LootCommand.frozenSteves;
- lc.frostyTheSnowmans = 0;
+ LootCommand.frostyTheSnowmans = 0;
if (statsObject.has("kills_frosty_the_snowman")) {
- lc.frostyTheSnowmans = statsObject.get("kills_frosty_the_snowman").getAsInt();
+ LootCommand.frostyTheSnowmans = statsObject.get("kills_frosty_the_snowman").getAsInt();
}
- lc.seaCreatures += lc.frostyTheSnowmans;
+ LootCommand.seaCreatures += LootCommand.frostyTheSnowmans;
- lc.grinches = 0;
+ LootCommand.grinches = 0;
if (statsObject.has("kills_grinch")) {
- lc.grinches = statsObject.get("kills_grinch").getAsInt();
+ LootCommand.grinches = statsObject.get("kills_grinch").getAsInt();
}
- lc.seaCreatures += lc.grinches;
+ LootCommand.seaCreatures += LootCommand.grinches;
- lc.yetis = 0;
+ LootCommand.yetis = 0;
if (statsObject.has("kills_yeti")) {
- lc.yetis = statsObject.get("kills_yeti").getAsInt();
+ LootCommand.yetis = statsObject.get("kills_yeti").getAsInt();
}
- lc.seaCreatures += lc.yetis;
+ LootCommand.seaCreatures += LootCommand.yetis;
- lc.nurseSharks = 0;
+ LootCommand.nurseSharks = 0;
if (statsObject.has("kills_nurse_shark")) {
- lc.nurseSharks = statsObject.get("kills_nurse_shark").getAsInt();
+ LootCommand.nurseSharks = statsObject.get("kills_nurse_shark").getAsInt();
}
- lc.seaCreatures += lc.nurseSharks;
+ LootCommand.seaCreatures += LootCommand.nurseSharks;
- lc.blueSharks = 0;
+ LootCommand.blueSharks = 0;
if (statsObject.has("kills_nurse_shark")) {
- lc.blueSharks = statsObject.get("kills_blue_shark").getAsInt();
+ LootCommand.blueSharks = statsObject.get("kills_blue_shark").getAsInt();
}
- lc.seaCreatures += lc.blueSharks;
+ LootCommand.seaCreatures += LootCommand.blueSharks;
- lc.tigerSharks = 0;
+ LootCommand.tigerSharks = 0;
if (statsObject.has("kills_nurse_shark")) {
- lc.tigerSharks = statsObject.get("kills_tiger_shark").getAsInt();
+ LootCommand.tigerSharks = statsObject.get("kills_tiger_shark").getAsInt();
}
- lc.seaCreatures += lc.tigerSharks;
+ LootCommand.seaCreatures += LootCommand.tigerSharks;
- lc.greatWhiteSharks = 0;
+ LootCommand.greatWhiteSharks = 0;
if (statsObject.has("kills_nurse_shark")) {
- lc.greatWhiteSharks = statsObject.get("kills_great_white_shark").getAsInt();
+ LootCommand.greatWhiteSharks = statsObject.get("kills_great_white_shark").getAsInt();
}
- lc.seaCreatures += lc.greatWhiteSharks;
+ LootCommand.seaCreatures += LootCommand.greatWhiteSharks;
+
+ LootCommand.scarecrows = 0;
+ if (statsObject.has("kills_scarecrow")) {
+ LootCommand.scarecrows = statsObject.get("kills_scarecrow").getAsInt();
+ }
+ LootCommand.seaCreatures += LootCommand.scarecrows;
+
+ LootCommand.nightmares = 0;
+ if (statsObject.has("kills_nightmare")) {
+ LootCommand.nightmares = statsObject.get("kills_nightmare").getAsInt();
+ }
+ LootCommand.seaCreatures += LootCommand.nightmares;
+
+ LootCommand.werewolfs = 0;
+ if (statsObject.has("kills_werewolf")) {
+ LootCommand.werewolfs = statsObject.get("kills_werewolf").getAsInt();
+ }
+ LootCommand.seaCreatures += LootCommand.werewolfs;
+
+ LootCommand.phantomFishers = 0;
+ if (statsObject.has("kills_phantom_fisherman")) {
+ LootCommand.phantomFishers = statsObject.get("kills_phantom_fisherman").getAsInt();
+ }
+ LootCommand.seaCreatures += LootCommand.phantomFishers;
+
+ LootCommand.grimReapers = 0;
+ if (statsObject.has("kills_grim_reaper")) {
+ LootCommand.grimReapers = statsObject.get("kills_grim_reaper").getAsInt();
+ }
+ LootCommand.seaCreatures += LootCommand.grimReapers;
System.out.println("Writing to config...");
- cf.writeIntConfig("fishing", "goodCatch", lc.goodCatches);
- cf.writeIntConfig("fishing", "greatCatch", lc.greatCatches);
- cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures);
- cf.writeIntConfig("fishing", "squid", lc.squids);
- cf.writeIntConfig("fishing", "seaWalker", lc.seaWalkers);
- cf.writeIntConfig("fishing", "nightSquid", lc.nightSquids);
- cf.writeIntConfig("fishing", "seaGuardian", lc.seaGuardians);
- cf.writeIntConfig("fishing", "seaWitch", lc.seaWitches);
- cf.writeIntConfig("fishing", "seaArcher", lc.seaArchers);
- cf.writeIntConfig("fishing", "monsterOfDeep", lc.monsterOfTheDeeps);
- cf.writeIntConfig("fishing", "catfish", lc.catfishes);
- cf.writeIntConfig("fishing", "carrotKing", lc.carrotKings);
- cf.writeIntConfig("fishing", "seaLeech", lc.seaLeeches);
- cf.writeIntConfig("fishing", "guardianDefender", lc.guardianDefenders);
- cf.writeIntConfig("fishing", "deepSeaProtector", lc.deepSeaProtectors);
- cf.writeIntConfig("fishing", "hydra", lc.hydras);
- cf.writeIntConfig("fishing", "seaEmperor", lc.seaEmperors);
- cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone);
- cf.writeIntConfig("fishing", "frozenSteve", lc.frozenSteves);
- cf.writeIntConfig("fishing", "snowman", lc.frostyTheSnowmans);
- cf.writeIntConfig("fishing", "grinch", lc.grinches);
- cf.writeIntConfig("fishing", "yeti", lc.yetis);
- cf.writeIntConfig("fishing", "nurseShark", lc.nurseSharks);
- cf.writeIntConfig("fishing", "blueShark", lc.blueSharks);
- cf.writeIntConfig("fishing", "tigerShark", lc.tigerSharks);
- cf.writeIntConfig("fishing", "greatWhiteShark", lc.greatWhiteSharks);
-
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Fishing stats imported."));
+ ConfigHandler.writeIntConfig("fishing", "goodCatch", LootCommand.goodCatches);
+ ConfigHandler.writeIntConfig("fishing", "greatCatch", LootCommand.greatCatches);
+ ConfigHandler.writeIntConfig("fishing", "seaCreature", LootCommand.seaCreatures);
+ ConfigHandler.writeIntConfig("fishing", "squid", LootCommand.squids);
+ ConfigHandler.writeIntConfig("fishing", "seaWalker", LootCommand.seaWalkers);
+ ConfigHandler.writeIntConfig("fishing", "nightSquid", LootCommand.nightSquids);
+ ConfigHandler.writeIntConfig("fishing", "seaGuardian", LootCommand.seaGuardians);
+ ConfigHandler.writeIntConfig("fishing", "seaWitch", LootCommand.seaWitches);
+ ConfigHandler.writeIntConfig("fishing", "seaArcher", LootCommand.seaArchers);
+ ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", LootCommand.monsterOfTheDeeps);
+ ConfigHandler.writeIntConfig("fishing", "catfish", LootCommand.catfishes);
+ ConfigHandler.writeIntConfig("fishing", "carrotKing", LootCommand.carrotKings);
+ ConfigHandler.writeIntConfig("fishing", "seaLeech", LootCommand.seaLeeches);
+ ConfigHandler.writeIntConfig("fishing", "guardianDefender", LootCommand.guardianDefenders);
+ ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", LootCommand.deepSeaProtectors);
+ ConfigHandler.writeIntConfig("fishing", "hydra", LootCommand.hydras);
+ ConfigHandler.writeIntConfig("fishing", "seaEmperor", LootCommand.seaEmperors);
+ ConfigHandler.writeIntConfig("fishing", "milestone", LootCommand.fishingMilestone);
+ ConfigHandler.writeIntConfig("fishing", "frozenSteve", LootCommand.frozenSteves);
+ ConfigHandler.writeIntConfig("fishing", "snowman", LootCommand.frostyTheSnowmans);
+ ConfigHandler.writeIntConfig("fishing", "grinch", LootCommand.grinches);
+ ConfigHandler.writeIntConfig("fishing", "yeti", LootCommand.yetis);
+ ConfigHandler.writeIntConfig("fishing", "nurseShark", LootCommand.nurseSharks);
+ ConfigHandler.writeIntConfig("fishing", "blueShark", LootCommand.blueSharks);
+ ConfigHandler.writeIntConfig("fishing", "tigerShark", LootCommand.tigerSharks);
+ ConfigHandler.writeIntConfig("fishing", "greatWhiteShark", LootCommand.greatWhiteSharks);
+ ConfigHandler.writeIntConfig("fishing", "scarecrow", LootCommand.scarecrows);
+ ConfigHandler.writeIntConfig("fishing", "nightmare", LootCommand.nightmares);
+ ConfigHandler.writeIntConfig("fishing", "werewolf", LootCommand.werewolfs);
+ ConfigHandler.writeIntConfig("fishing", "phantomFisher", LootCommand.phantomFishers);
+ ConfigHandler.writeIntConfig("fishing", "grimReaper", LootCommand.grimReapers);
+
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Fishing stats imported."));
}).start();
}
diff --git a/src/main/java/me/Danker/commands/LobbySkillsCommand.java b/src/main/java/me/Danker/commands/LobbySkillsCommand.java
index 9eb01a3..679898d 100644
--- a/src/main/java/me/Danker/commands/LobbySkillsCommand.java
+++ b/src/main/java/me/Danker/commands/LobbySkillsCommand.java
@@ -11,6 +11,7 @@ import java.util.stream.Collectors;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
+import me.Danker.TheMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -45,15 +46,12 @@ public class LobbySkillsCommand extends CommandBase {
@Override
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
EntityPlayer playerSP = (EntityPlayer) arg0;
- ConfigHandler cf = new ConfigHandler();
- APIHandler ah = new APIHandler();
- boolean someErrored = false;
Map<String, Double> unsortedSAList = new HashMap<String, Double>();
ArrayList<Double> lobbySkills = new ArrayList<Double>();
// Check key
- String key = cf.getString("api", "APIKey");
+ String key = ConfigHandler.getString("api", "APIKey");
if (key.equals("")) {
- playerSP.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
+ playerSP.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey."));
return;
}
@@ -61,7 +59,7 @@ public class LobbySkillsCommand extends CommandBase {
try {
// Create deep copy of players to prevent passing reference and ConcurrentModificationException
Collection<NetworkPlayerInfo> players = new ArrayList<NetworkPlayerInfo>(Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap());
- playerSP.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking skill average of lobby. Estimated time: " + (int) (players.size() * 1.2 + 1) + " seconds."));
+ playerSP.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking skill average of lobby. Estimated time: " + (int) (players.size() * 1.2 + 1) + " seconds."));
// Send request every .6 seconds, leaving room for another 20 requests per minute
for (final NetworkPlayerInfo player : players) {
@@ -71,7 +69,7 @@ public class LobbySkillsCommand extends CommandBase {
long biggestLastSave = 0;
int profileIndex = -1;
Thread.sleep(600);
- JsonObject profileResponse = ah.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);
if (!profileResponse.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
System.out.println("User " + player.getGameProfile().getName() + " failed with reason: " + reason);
@@ -103,41 +101,41 @@ public class LobbySkillsCommand extends CommandBase {
if (latestProfile.has("experience_skill_farming") || latestProfile.has("experience_skill_mining") || latestProfile.has("experience_skill_combat") || latestProfile.has("experience_skill_foraging") || latestProfile.has("experience_skill_fishing") || latestProfile.has("experience_skill_enchanting") || latestProfile.has("experience_skill_alchemy")) {
if (latestProfile.has("experience_skill_farming")) {
- farmingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_farming").getAsDouble());
+ farmingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_farming").getAsDouble(), 60);
farmingLevel = (double) Math.round(farmingLevel * 100) / 100;
}
if (latestProfile.has("experience_skill_mining")) {
- miningLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_mining").getAsDouble());
+ miningLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_mining").getAsDouble(), 50);
miningLevel = (double) Math.round(miningLevel * 100) / 100;
}
if (latestProfile.has("experience_skill_combat")) {
- combatLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_combat").getAsDouble());
+ combatLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_combat").getAsDouble(), 50);
combatLevel = (double) Math.round(combatLevel * 100) / 100;
}
if (latestProfile.has("experience_skill_foraging")) {
- foragingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_foraging").getAsDouble());
+ foragingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_foraging").getAsDouble(), 50);
foragingLevel = (double) Math.round(foragingLevel * 100) / 100;
}
if (latestProfile.has("experience_skill_fishing")) {
- fishingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_fishing").getAsDouble());
+ fishingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_fishing").getAsDouble(), 50);
fishingLevel = (double) Math.round(fishingLevel * 100) / 100;
}
if (latestProfile.has("experience_skill_enchanting")) {
- enchantingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_enchanting").getAsDouble());
+ enchantingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_enchanting").getAsDouble(), 50);
enchantingLevel = (double) Math.round(enchantingLevel * 100) / 100;
}
if (latestProfile.has("experience_skill_alchemy")) {
- alchemyLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_alchemy").getAsDouble());
+ alchemyLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_alchemy").getAsDouble(), 50);
alchemyLevel = (double) Math.round(alchemyLevel * 100) / 100;
}
if (latestProfile.has("experience_skill_taming")) {
- tamingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_taming").getAsDouble());
+ tamingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_taming").getAsDouble(), 50);
tamingLevel = (double) Math.round(tamingLevel * 100) / 100;
}
} else {
Thread.sleep(600); // Sleep for another request
System.out.println("Fetching skills from achievement API");
- JsonObject playerObject = ah.getResponse("https://api.hypixel.net/player?uuid=" + UUID + "&key=" + key);
+ JsonObject playerObject = APIHandler.getResponse("https://api.hypixel.net/player?uuid=" + UUID + "&key=" + key);
if (!playerObject.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
@@ -187,7 +185,7 @@ public class LobbySkillsCommand extends CommandBase {
String[] sortedSAListKeys = sortedSAList.keySet().toArray(new String[sortedSAList.keySet().size()]);
String top3 = "";
for (int i = 0; i < 3 && i < sortedSAListKeys.length; i++) {
- top3 += "\n " + EnumChatFormatting.AQUA + sortedSAListKeys[i] + ": " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + sortedSAList.get(sortedSAListKeys[i]);
+ top3 += "\n " + EnumChatFormatting.AQUA + sortedSAListKeys[i] + ": " + TheMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + sortedSAList.get(sortedSAListKeys[i]);
}
// Get lobby sa
@@ -198,10 +196,10 @@ public class LobbySkillsCommand extends CommandBase {
lobbySA = (double) Math.round((lobbySA / lobbySkills.size()) * 100) / 100;
// Finally say skill lobby avg and highest SA users
- playerSP.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
- EnumChatFormatting.GREEN + " Lobby Skill Average: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + lobbySA + "\n" +
- EnumChatFormatting.GREEN + " Highest Skill Averages:" + top3 + "\n" +
- EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + " -------------------"));
+ playerSP.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ TheMod.TYPE_COLOUR + " Lobby Skill Average: " + TheMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + lobbySA + "\n" +
+ TheMod.TYPE_COLOUR + " Highest Skill Averages:" + top3 + "\n" +
+ TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + " -------------------"));
} catch (InterruptedException ex) {
System.out.println("Current skill average list: " + unsortedSAList.toString());
Thread.currentThread().interrupt();
diff --git a/src/main/java/me/Danker/commands/LootCommand.java b/src/main/java/me/Danker/commands/LootCommand.java
index 65f8031..ffe5e49 100644
--- a/src/main/java/me/Danker/commands/LootCommand.java
+++ b/src/main/java/me/Danker/commands/LootCommand.java
@@ -4,6 +4,7 @@ import java.text.NumberFormat;
import java.util.List;
import java.util.Locale;
+import me.Danker.TheMod;
import me.Danker.utils.Utils;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -95,6 +96,18 @@ public class LootCommand extends CommandBase {
public static int phantomFishers;
public static int grimReapers;
+ // Mythological
+ public static double mythCoins;
+ public static int griffinFeathers;
+ public static int crownOfGreeds;
+ public static int washedUpSouvenirs;
+ public static int minosHunters;
+ public static int siameseLynxes;
+ public static int minotaurs;
+ public static int gaiaConstructs;
+ public static int minosChampions;
+ public static int minosInquisitors;
+
// Catacombs Dungeons
public static int recombobulators;
public static int fumingPotatoBooks;
@@ -104,6 +117,7 @@ public class LootCommand extends CommandBase {
public static double f1TimeSpent;
// F2
public static int scarfStudies;
+ public static int adaptiveSwords;
public static double f2CoinsSpent;
public static double f2TimeSpent;
// F3
@@ -111,7 +125,6 @@ public class LootCommand extends CommandBase {
public static int adaptiveChests;
public static int adaptiveLegs;
public static int adaptiveBoots;
- public static int adaptiveSwords;
public static double f3CoinsSpent;
public static double f3TimeSpent;
// F4
@@ -130,6 +143,7 @@ public class LootCommand extends CommandBase {
public static int shadowAssChests;
public static int shadowAssLegs;
public static int shadowAssBoots;
+ public static int lastBreaths;
public static int lividDaggers;
public static int shadowFurys;
public static double f5CoinsSpent;
@@ -145,6 +159,20 @@ 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 necronsHandles;
+ 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
@@ -228,6 +256,18 @@ public class LootCommand extends CommandBase {
public static int phantomFishersSession = 0;
public static int grimReapersSession = 0;
+ // Mythological
+ public static double mythCoinsSession = 0;
+ public static int griffinFeathersSession = 0;
+ public static int crownOfGreedsSession = 0;
+ public static int washedUpSouvenirsSession = 0;
+ public static int minosHuntersSession = 0;
+ public static int siameseLynxesSession = 0;
+ public static int minotaursSession = 0;
+ public static int gaiaConstructsSession = 0;
+ public static int minosChampionsSession = 0;
+ public static int minosInquisitorsSession = 0;
+
// Catacombs Dungeons
public static int recombobulatorsSession = 0;
public static int fumingPotatoBooksSession = 0;
@@ -237,6 +277,7 @@ public class LootCommand extends CommandBase {
public static double f1TimeSpentSession = 0;
// F2
public static int scarfStudiesSession = 0;
+ public static int adaptiveSwordsSession = 0;
public static double f2CoinsSpentSession = 0;
public static double f2TimeSpentSession = 0;
// F3
@@ -244,7 +285,6 @@ public class LootCommand extends CommandBase {
public static int adaptiveChestsSession = 0;
public static int adaptiveLegsSession = 0;
public static int adaptiveBootsSession = 0;
- public static int adaptiveSwordsSession = 0;
public static double f3CoinsSpentSession = 0;
public static double f3TimeSpentSession = 0;
// F4
@@ -263,6 +303,7 @@ public class LootCommand extends CommandBase {
public static int shadowAssChestsSession = 0;
public static int shadowAssLegsSession = 0;
public static int shadowAssBootsSession = 0;
+ public static int lastBreathsSession = 0;
public static int lividDaggersSession = 0;
public static int shadowFurysSession = 0;
public static double f5CoinsSpentSession = 0;
@@ -278,6 +319,20 @@ 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 necronsHandlesSession = 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() {
@@ -286,7 +341,7 @@ public class LootCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs> [winter/festival/spooky/f(1-6)/session]";
+ return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/mythological> [winter/festival/spooky/f(1-7)/session]";
}
@Override
@@ -297,11 +352,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");
+ return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "mythological");
} 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");
}
@@ -313,7 +368,7 @@ public class LootCommand extends CommandBase {
final EntityPlayer player = (EntityPlayer) arg0;
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
@@ -326,542 +381,636 @@ public class LootCommand extends CommandBase {
if (arg1[arg1.length - 1].equalsIgnoreCase("session")) showSession = true;
- if (arg1[0].equalsIgnoreCase("wolf")) {
- if (showSession) {
- if (wolfTimeSession == -1) {
+ switch (arg1[0].toLowerCase()) {
+ case "wolf":
+ if (showSession) {
+ if (wolfTimeSession == -1) {
+ timeBetween = "Never";
+ } else {
+ timeBetween = Utils.getTimeBetween(wolfTimeSession, timeNow);
+ }
+ if (wolfBossesSession == -1) {
+ bossesBetween = "Never";
+ } else {
+ bossesBetween = nf.format(wolfBossesSession);
+ }
+ if (ToggleCommand.slayerCountTotal) {
+ drop20 = nf.format(wolfWheelsSession);
+ } else {
+ drop20 = nf.format(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(wolfSvensSession) + "\n" +
+ EnumChatFormatting.GREEN + " Wolf Teeth: " + nf.format(wolfTeethSession) + "\n" +
+ EnumChatFormatting.BLUE + " Hamster Wheels: " + drop20 + "\n" +
+ EnumChatFormatting.AQUA + " Spirit Runes: " + wolfSpiritsSession + "\n" +
+ EnumChatFormatting.WHITE + " Critical VI Books: " + wolfBooksSession + "\n" +
+ EnumChatFormatting.DARK_RED + " Red Claw Eggs: " + wolfEggsSession + "\n" +
+ EnumChatFormatting.GOLD + " Couture Runes: " + wolfCouturesSession + "\n" +
+ EnumChatFormatting.AQUA + " Grizzly Baits: " + wolfBaitsSession + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Overfluxes: " + wolfFluxesSession + "\n" +
+ EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" +
+ EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" +
+ EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
+ return;
+ }
+
+ if (wolfTime == -1) {
timeBetween = "Never";
} else {
- timeBetween = Utils.getTimeBetween(wolfTimeSession, timeNow);
+ timeBetween = Utils.getTimeBetween(wolfTime, timeNow);
}
- if (wolfBossesSession == -1) {
+ if (wolfBosses == -1) {
bossesBetween = "Never";
} else {
- bossesBetween = nf.format(wolfBossesSession);
+ bossesBetween = nf.format(wolfBosses);
}
if (ToggleCommand.slayerCountTotal) {
- drop20 = nf.format(wolfWheelsSession);
+ drop20 = nf.format(wolfWheels);
} else {
- drop20 = nf.format(wolfWheelsDropsSession) + " times";
+ drop20 = nf.format(wolfWheelsDrops) + " 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(wolfSvensSession) + "\n" +
- EnumChatFormatting.GREEN + " Wolf Teeth: " + nf.format(wolfTeethSession) + "\n" +
+ EnumChatFormatting.DARK_AQUA + EnumChatFormatting.BOLD + " Sven Loot Summary:\n" +
+ EnumChatFormatting.GOLD + " Svens Killed: " + nf.format(wolfSvens) + "\n" +
+ EnumChatFormatting.GREEN + " Wolf Teeth: " + nf.format(wolfTeeth) + "\n" +
EnumChatFormatting.BLUE + " Hamster Wheels: " + drop20 + "\n" +
- EnumChatFormatting.AQUA + " Spirit Runes: " + wolfSpiritsSession + "\n" +
- EnumChatFormatting.WHITE + " Critical VI Books: " + wolfBooksSession + "\n" +
- EnumChatFormatting.DARK_RED + " Red Claw Eggs: " + wolfEggsSession + "\n" +
- EnumChatFormatting.GOLD + " Couture Runes: " + wolfCouturesSession + "\n" +
- EnumChatFormatting.AQUA + " Grizzly Baits: " + wolfBaitsSession + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Overfluxes: " + wolfFluxesSession + "\n" +
+ EnumChatFormatting.AQUA + " Spirit Runes: " + wolfSpirits + "\n" +
+ EnumChatFormatting.WHITE + " Critical VI Books: " + wolfBooks + "\n" +
+ EnumChatFormatting.DARK_RED + " Red Claw Eggs: " + wolfEggs + "\n" +
+ EnumChatFormatting.GOLD + " Couture Runes: " + wolfCoutures + "\n" +
+ EnumChatFormatting.AQUA + " Grizzly Baits: " + wolfBaits + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Overfluxes: " + wolfFluxes + "\n" +
EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" +
EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" +
EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
- return;
- }
-
- if (wolfTime == -1) {
- timeBetween = "Never";
- } else {
- timeBetween = Utils.getTimeBetween(wolfTime, timeNow);
- }
- if (wolfBosses == -1) {
- bossesBetween = "Never";
- } else {
- bossesBetween = nf.format(wolfBosses);
- }
- if (ToggleCommand.slayerCountTotal) {
- drop20 = nf.format(wolfWheels);
- } else {
- drop20 = nf.format(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(wolfSvens) + "\n" +
- EnumChatFormatting.GREEN + " Wolf Teeth: " + nf.format(wolfTeeth) + "\n" +
- EnumChatFormatting.BLUE + " Hamster Wheels: " + drop20 + "\n" +
- EnumChatFormatting.AQUA + " Spirit Runes: " + wolfSpirits + "\n" +
- EnumChatFormatting.WHITE + " Critical VI Books: " + wolfBooks + "\n" +
- EnumChatFormatting.DARK_RED + " Red Claw Eggs: " + wolfEggs + "\n" +
- EnumChatFormatting.GOLD + " Couture Runes: " + wolfCoutures + "\n" +
- EnumChatFormatting.AQUA + " Grizzly Baits: " + wolfBaits + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Overfluxes: " + wolfFluxes + "\n" +
- EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" +
- EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" +
- EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
- } else if (arg1[0].equalsIgnoreCase("spider")) {
- if (showSession) {
- if (spiderTimeSession == -1) {
+ break;
+ case "spider":
+ if (showSession) {
+ if (spiderTimeSession == -1) {
+ timeBetween = "Never";
+ } else {
+ timeBetween = Utils.getTimeBetween(spiderTimeSession, timeNow);
+ }
+ if (spiderBossesSession == -1) {
+ bossesBetween = "Never";
+ } else {
+ bossesBetween = nf.format(spiderBossesSession);
+ }
+ if (ToggleCommand.slayerCountTotal) {
+ drop20 = nf.format(spiderTAPSession);
+ } else {
+ drop20 = nf.format(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(spiderTarantulasSession) + "\n" +
+ EnumChatFormatting.GREEN + " Tarantula Webs: " + nf.format(spiderWebsSession) + "\n" +
+ EnumChatFormatting.DARK_GREEN + " Arrow Poison: " + drop20 + "\n" +
+ EnumChatFormatting.DARK_GRAY + " Bite Runes: " + spiderBitesSession + "\n" +
+ EnumChatFormatting.WHITE + " Bane VI Books: " + spiderBooksSession + "\n" +
+ EnumChatFormatting.AQUA + " Spider Catalysts: " + spiderCatalystsSession + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Tarantula Talismans: " + spiderTalismansSession + "\n" +
+ EnumChatFormatting.LIGHT_PURPLE + " Fly Swatters: " + spiderSwattersSession + "\n" +
+ EnumChatFormatting.GOLD + " Digested Mosquitos: " + spiderMosquitosSession + "\n" +
+ EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" +
+ EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" +
+ EnumChatFormatting.RED + EnumChatFormatting.BOLD + " -------------------"));
+ return;
+ }
+
+ if (spiderTime == -1) {
timeBetween = "Never";
} else {
- timeBetween = Utils.getTimeBetween(spiderTimeSession, timeNow);
+ timeBetween = Utils.getTimeBetween(spiderTime, timeNow);
}
- if (spiderBossesSession == -1) {
+ if (spiderBosses == -1) {
bossesBetween = "Never";
} else {
- bossesBetween = nf.format(spiderBossesSession);
+ bossesBetween = nf.format(spiderBosses);
}
if (ToggleCommand.slayerCountTotal) {
- drop20 = nf.format(spiderTAPSession);
+ drop20 = nf.format(spiderTAP);
} else {
- drop20 = nf.format(spiderTAPDropsSession) + " times";
+ drop20 = nf.format(spiderTAPDrops) + " 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(spiderTarantulasSession) + "\n" +
- EnumChatFormatting.GREEN + " Tarantula Webs: " + nf.format(spiderWebsSession) + "\n" +
+ EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " Spider Loot Summary:\n" +
+ EnumChatFormatting.GOLD + " Tarantulas Killed: " + nf.format(spiderTarantulas) + "\n" +
+ EnumChatFormatting.GREEN + " Tarantula Webs: " + nf.format(spiderWebs) + "\n" +
EnumChatFormatting.DARK_GREEN + " Arrow Poison: " + drop20 + "\n" +
- EnumChatFormatting.DARK_GRAY + " Bite Runes: " + spiderBitesSession + "\n" +
- EnumChatFormatting.WHITE + " Bane VI Books: " + spiderBooksSession + "\n" +
- EnumChatFormatting.AQUA + " Spider Catalysts: " + spiderCatalystsSession + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Tarantula Talismans: " + spiderTalismansSession + "\n" +
- EnumChatFormatting.LIGHT_PURPLE + " Fly Swatters: " + spiderSwattersSession + "\n" +
- EnumChatFormatting.GOLD + " Digested Mosquitos: " + spiderMosquitosSession + "\n" +
+ EnumChatFormatting.DARK_GRAY + " Bite Runes: " + spiderBites + "\n" +
+ EnumChatFormatting.WHITE + " Bane VI Books: " + spiderBooks + "\n" +
+ EnumChatFormatting.AQUA + " Spider Catalysts: " + spiderCatalysts + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Tarantula Talismans: " + spiderTalismans + "\n" +
+ EnumChatFormatting.LIGHT_PURPLE + " Fly Swatters: " + spiderSwatters + "\n" +
+ EnumChatFormatting.GOLD + " Digested Mosquitos: " + spiderMosquitos + "\n" +
EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" +
EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" +
EnumChatFormatting.RED + EnumChatFormatting.BOLD + " -------------------"));
- return;
- }
-
- if (spiderTime == -1) {
- timeBetween = "Never";
- } else {
- timeBetween = Utils.getTimeBetween(spiderTime, timeNow);
- }
- if (spiderBosses == -1) {
- bossesBetween = "Never";
- } else {
- bossesBetween = nf.format(spiderBosses);
- }
- if (ToggleCommand.slayerCountTotal) {
- drop20 = nf.format(spiderTAP);
- } else {
- drop20 = nf.format(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(spiderTarantulas) + "\n" +
- EnumChatFormatting.GREEN + " Tarantula Webs: " + nf.format(spiderWebs) + "\n" +
- EnumChatFormatting.DARK_GREEN + " Arrow Poison: " + drop20 + "\n" +
- EnumChatFormatting.DARK_GRAY + " Bite Runes: " + spiderBites + "\n" +
- EnumChatFormatting.WHITE + " Bane VI Books: " + spiderBooks + "\n" +
- EnumChatFormatting.AQUA + " Spider Catalysts: " + spiderCatalysts + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Tarantula Talismans: " + spiderTalismans + "\n" +
- EnumChatFormatting.LIGHT_PURPLE + " Fly Swatters: " + spiderSwatters + "\n" +
- EnumChatFormatting.GOLD + " Digested Mosquitos: " + spiderMosquitos + "\n" +
- EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" +
- EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" +
- EnumChatFormatting.RED + EnumChatFormatting.BOLD + " -------------------"));
- } else if (arg1[0].equalsIgnoreCase("zombie")) {
- if (showSession) {
- if (zombieTimeSession == -1) {
+ break;
+ case "zombie":
+ if (showSession) {
+ if (zombieTimeSession == -1) {
+ timeBetween = "Never";
+ } else {
+ timeBetween = Utils.getTimeBetween(zombieTimeSession, timeNow);
+ }
+ if (zombieBossesSession == -1) {
+ bossesBetween = "Never";
+ } else {
+ bossesBetween = nf.format(zombieBossesSession);
+ }
+ if (ToggleCommand.slayerCountTotal) {
+ drop20 = nf.format(zombieFoulFleshSession);
+ } else {
+ drop20 = nf.format(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(zombieRevsSession) + "\n" +
+ EnumChatFormatting.GREEN + " Revenant Flesh: " + nf.format(zombieRevFleshSession) + "\n" +
+ EnumChatFormatting.BLUE + " Foul Flesh: " + drop20 + "\n" +
+ EnumChatFormatting.DARK_GREEN + " Pestilence Runes: " + zombiePestilencesSession + "\n" +
+ EnumChatFormatting.WHITE + " Smite VI Books: " + zombieBooksSession + "\n" +
+ EnumChatFormatting.AQUA + " Undead Catalysts: " + zombieUndeadCatasSession + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Beheaded Horrors: " + zombieBeheadedsSession + "\n" +
+ EnumChatFormatting.RED + " Revenant Catalysts: " + zombieRevCatasSession + "\n" +
+ EnumChatFormatting.DARK_GREEN + " Snake Runes: " + zombieSnakesSession + "\n" +
+ EnumChatFormatting.GOLD + " Scythe Blades: " + zombieScythesSession + "\n" +
+ EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" +
+ EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" +
+ EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + " -------------------"));
+ return;
+ }
+
+ if (zombieTime == -1) {
timeBetween = "Never";
} else {
- timeBetween = Utils.getTimeBetween(zombieTimeSession, timeNow);
+ timeBetween = Utils.getTimeBetween(zombieTime, timeNow);
}
- if (zombieBossesSession == -1) {
+ if (zombieBosses == -1) {
bossesBetween = "Never";
} else {
- bossesBetween = nf.format(zombieBossesSession);
+ bossesBetween = nf.format(zombieBosses);
}
if (ToggleCommand.slayerCountTotal) {
- drop20 = nf.format(zombieFoulFleshSession);
+ drop20 = nf.format(zombieFoulFlesh);
} else {
- drop20 = nf.format(zombieFoulFleshDropsSession) + " times";
+ drop20 = nf.format(zombieFoulFleshDrops) + " 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(zombieRevsSession) + "\n" +
- EnumChatFormatting.GREEN + " Revenant Flesh: " + nf.format(zombieRevFleshSession) + "\n" +
+ EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + " Zombie Loot Summary:\n" +
+ EnumChatFormatting.GOLD + " Revs Killed: " + nf.format(zombieRevs) + "\n" +
+ EnumChatFormatting.GREEN + " Revenant Flesh: " + nf.format(zombieRevFlesh) + "\n" +
EnumChatFormatting.BLUE + " Foul Flesh: " + drop20 + "\n" +
- EnumChatFormatting.DARK_GREEN + " Pestilence Runes: " + zombiePestilencesSession + "\n" +
- EnumChatFormatting.WHITE + " Smite VI Books: " + zombieBooksSession + "\n" +
- EnumChatFormatting.AQUA + " Undead Catalysts: " + zombieUndeadCatasSession + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Beheaded Horrors: " + zombieBeheadedsSession + "\n" +
- EnumChatFormatting.RED + " Revenant Catalysts: " + zombieRevCatasSession + "\n" +
- EnumChatFormatting.DARK_GREEN + " Snake Runes: " + zombieSnakesSession + "\n" +
- EnumChatFormatting.GOLD + " Scythe Blades: " + zombieScythesSession + "\n" +
+ EnumChatFormatting.DARK_GREEN + " Pestilence Runes: " + zombiePestilences + "\n" +
+ EnumChatFormatting.WHITE + " Smite VI Books: " + zombieBooks + "\n" +
+ EnumChatFormatting.AQUA + " Undead Catalysts: " + zombieUndeadCatas + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Beheaded Horrors: " + zombieBeheadeds + "\n" +
+ EnumChatFormatting.RED + " Revenant Catalysts: " + zombieRevCatas + "\n" +
+ EnumChatFormatting.DARK_GREEN + " Snake Runes: " + zombieSnakes + "\n" +
+ EnumChatFormatting.GOLD + " Scythe Blades: " + zombieScythes + "\n" +
EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" +
EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" +
EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + " -------------------"));
- return;
- }
-
- if (zombieTime == -1) {
- timeBetween = "Never";
- } else {
- timeBetween = Utils.getTimeBetween(zombieTime, timeNow);
- }
- if (zombieBosses == -1) {
- bossesBetween = "Never";
- } else {
- bossesBetween = nf.format(zombieBosses);
- }
- if (ToggleCommand.slayerCountTotal) {
- drop20 = nf.format(zombieFoulFlesh);
- } else {
- drop20 = nf.format(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(zombieRevs) + "\n" +
- EnumChatFormatting.GREEN + " Revenant Flesh: " + nf.format(zombieRevFlesh) + "\n" +
- EnumChatFormatting.BLUE + " Foul Flesh: " + drop20 + "\n" +
- EnumChatFormatting.DARK_GREEN + " Pestilence Runes: " + zombiePestilences + "\n" +
- EnumChatFormatting.WHITE + " Smite VI Books: " + zombieBooks + "\n" +
- EnumChatFormatting.AQUA + " Undead Catalysts: " + zombieUndeadCatas + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Beheaded Horrors: " + zombieBeheadeds + "\n" +
- EnumChatFormatting.RED + " Revenant Catalysts: " + zombieRevCatas + "\n" +
- EnumChatFormatting.DARK_GREEN + " Snake Runes: " + zombieSnakes + "\n" +
- EnumChatFormatting.GOLD + " Scythe Blades: " + zombieScythes + "\n" +
- EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" +
- EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" +
- EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + " -------------------"));
- } else if (arg1[0].equalsIgnoreCase("fishing")) {
- if (arg1.length > 1) {
- if (arg1[1].equalsIgnoreCase("winter")) {
- if (showSession) {
- if (yetiTimeSession == -1) {
+ break;
+ case "fishing":
+ if (arg1.length > 1) {
+ if (arg1[1].equalsIgnoreCase("winter")) {
+ if (showSession) {
+ if (yetiTimeSession == -1) {
+ timeBetween = "Never";
+ } else {
+ timeBetween = Utils.getTimeBetween(yetiTimeSession, timeNow);
+ }
+ if (yetiSCsSession == -1) {
+ bossesBetween = "Never";
+ } else {
+ bossesBetween = nf.format(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(frozenStevesSession) + "\n" +
+ EnumChatFormatting.WHITE + " Snowmans: " + nf.format(frostyTheSnowmansSession) + "\n" +
+ EnumChatFormatting.DARK_GREEN + " Grinches: " + nf.format(grinchesSession) + "\n" +
+ EnumChatFormatting.GOLD + " Yetis: " + nf.format(yetisSession) + "\n" +
+ EnumChatFormatting.AQUA + " Time Since Yeti: " + timeBetween + "\n" +
+ EnumChatFormatting.AQUA + " Creatures Since Yeti: " + bossesBetween + "\n" +
+ EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
+ return;
+ }
+
+ if (yetiTime == -1) {
timeBetween = "Never";
} else {
- timeBetween = Utils.getTimeBetween(yetiTimeSession, timeNow);
+ timeBetween = Utils.getTimeBetween(yetiTime, timeNow);
}
- if (yetiSCsSession == -1) {
+ if (yetiSCs == -1) {
bossesBetween = "Never";
} else {
- bossesBetween = nf.format(yetiSCsSession);
+ bossesBetween = nf.format(yetiSCs);
}
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(frozenStevesSession) + "\n" +
- EnumChatFormatting.WHITE + " Snowmans: " + nf.format(frostyTheSnowmansSession) + "\n" +
- EnumChatFormatting.DARK_GREEN + " Grinches: " + nf.format(grinchesSession) + "\n" +
- EnumChatFormatting.GOLD + " Yetis: " + nf.format(yetisSession) + "\n" +
- EnumChatFormatting.AQUA + " Time Since Yeti: " + timeBetween + "\n" +
- EnumChatFormatting.AQUA + " Creatures Since Yeti: " + bossesBetween + "\n" +
- EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
+ EnumChatFormatting.WHITE + EnumChatFormatting.BOLD + " Winter Fishing Summary:\n" +
+ EnumChatFormatting.AQUA + " Frozen Steves: " + nf.format(frozenSteves) + "\n" +
+ EnumChatFormatting.WHITE + " Snowmans: " + nf.format(frostyTheSnowmans) + "\n" +
+ EnumChatFormatting.DARK_GREEN + " Grinches: " + nf.format(grinches) + "\n" +
+ EnumChatFormatting.GOLD + " Yetis: " + nf.format(yetis) + "\n" +
+ EnumChatFormatting.AQUA + " Time Since Yeti: " + timeBetween + "\n" +
+ EnumChatFormatting.AQUA + " Creatures Since Yeti: " + bossesBetween + "\n" +
+ EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
return;
+ } else if (arg1[1].equalsIgnoreCase("festival")) {
+ 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(nurseSharksSession) + "\n" +
+ EnumChatFormatting.BLUE + " Blue Sharks: " + nf.format(blueSharksSession) + "\n" +
+ EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(tigerSharksSession) + "\n" +
+ EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(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(nurseSharks) + "\n" +
+ EnumChatFormatting.BLUE + " Blue Sharks: " + nf.format(blueSharks) + "\n" +
+ EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(tigerSharks) + "\n" +
+ EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(greatWhiteSharks) + "\n" +
+ EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
+ } 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(scarecrowsSession) + "\n" +
+ EnumChatFormatting.GRAY + " Nightmares: " + nf.format(nightmaresSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Werewolves: " + nf.format(werewolfsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(phantomFishersSession) + "\n" +
+ EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(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(scarecrows) + "\n" +
+ EnumChatFormatting.GRAY + " Nightmares: " + nf.format(nightmares) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Werewolves: " + nf.format(werewolfs) + "\n" +
+ EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(phantomFishers) + "\n" +
+ EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(grimReapers) + "\n" +
+ EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------"));
}
-
- if (yetiTime == -1) {
+ }
+
+ if (showSession) {
+ if (empTimeSession == -1) {
timeBetween = "Never";
} else {
- timeBetween = Utils.getTimeBetween(yetiTime, timeNow);
+ timeBetween = Utils.getTimeBetween(empTimeSession, timeNow);
}
- if (yetiSCs == -1) {
+ if (empSCsSession == -1) {
bossesBetween = "Never";
} else {
- bossesBetween = nf.format(yetiSCs);
+ bossesBetween = nf.format(empSCsSession);
}
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
- EnumChatFormatting.WHITE + EnumChatFormatting.BOLD + " Winter Fishing Summary:\n" +
- EnumChatFormatting.AQUA + " Frozen Steves: " + nf.format(frozenSteves) + "\n" +
- EnumChatFormatting.WHITE + " Snowmans: " + nf.format(frostyTheSnowmans) + "\n" +
- EnumChatFormatting.DARK_GREEN + " Grinches: " + nf.format(grinches) + "\n" +
- EnumChatFormatting.GOLD + " Yetis: " + nf.format(yetis) + "\n" +
- EnumChatFormatting.AQUA + " Time Since Yeti: " + timeBetween + "\n" +
- EnumChatFormatting.AQUA + " Creatures Since Yeti: " + bossesBetween + "\n" +
- EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
+ 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(seaCreaturesSession) + "\n" +
+ EnumChatFormatting.GOLD + " Good Catches: " + nf.format(goodCatchesSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Great Catches: " + nf.format(greatCatchesSession) + "\n\n" +
+ EnumChatFormatting.GRAY + " Squids: " + nf.format(squidsSession) + "\n" +
+ EnumChatFormatting.GREEN + " Sea Walkers: " + nf.format(seaWalkersSession) + "\n" +
+ EnumChatFormatting.DARK_GRAY + " Night Squids: " + nf.format(nightSquidsSession) + "\n" +
+ EnumChatFormatting.DARK_AQUA + " Sea Guardians: " + nf.format(seaGuardiansSession) + "\n" +
+ EnumChatFormatting.BLUE + " Sea Witches: " + nf.format(seaWitchesSession) + "\n" +
+ EnumChatFormatting.GREEN + " Sea Archers: " + nf.format(seaArchersSession) + "\n" +
+ EnumChatFormatting.GREEN + " Monster of the Deeps: " + nf.format(monsterOfTheDeepsSession) + "\n" +
+ EnumChatFormatting.YELLOW + " Catfishes: " + nf.format(catfishesSession) + "\n" +
+ EnumChatFormatting.GOLD + " Carrot Kings: " + nf.format(carrotKingsSession) + "\n" +
+ EnumChatFormatting.GRAY + " Sea Leeches: " + nf.format(seaLeechesSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Guardian Defenders: " + nf.format(guardianDefendersSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Deep Sea Protectors: " + nf.format(deepSeaProtectorsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Hydras: " + nf.format(hydrasSession) + "\n" +
+ EnumChatFormatting.GOLD + " Sea Emperors: " + nf.format(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;
- } else if (arg1[1].equalsIgnoreCase("festival")) {
- 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(nurseSharksSession) + "\n" +
- EnumChatFormatting.BLUE + " Blue Sharks: " + nf.format(blueSharksSession) + "\n" +
- EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(tigerSharksSession) + "\n" +
- EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(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(nurseSharks) + "\n" +
- EnumChatFormatting.BLUE + " Blue Sharks: " + nf.format(blueSharks) + "\n" +
- EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(tigerSharks) + "\n" +
- EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(greatWhiteSharks) + "\n" +
- EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
- } 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(scarecrowsSession) + "\n" +
- EnumChatFormatting.GRAY + " Nightmares: " + nf.format(nightmaresSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Werewolves: " + nf.format(werewolfsSession) + "\n" +
- EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(phantomFishersSession) + "\n" +
- EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(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(scarecrows) + "\n" +
- EnumChatFormatting.GRAY + " Nightmares: " + nf.format(nightmares) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Werewolves: " + nf.format(werewolfs) + "\n" +
- EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(phantomFishers) + "\n" +
- EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(grimReapers) + "\n" +
- EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------"));
}
- }
-
- if (showSession) {
- if (empTimeSession == -1) {
+
+ if (empTime == -1) {
timeBetween = "Never";
} else {
- timeBetween = Utils.getTimeBetween(empTimeSession, timeNow);
+ timeBetween = Utils.getTimeBetween(empTime, timeNow);
}
- if (empSCsSession == -1) {
+ if (empSCs == -1) {
bossesBetween = "Never";
} else {
- bossesBetween = nf.format(empSCsSession);
+ bossesBetween = nf.format(empSCs);
}
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(seaCreaturesSession) + "\n" +
- EnumChatFormatting.GOLD + " Good Catches: " + nf.format(goodCatchesSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Great Catches: " + nf.format(greatCatchesSession) + "\n\n" +
- EnumChatFormatting.GRAY + " Squids: " + nf.format(squidsSession) + "\n" +
- EnumChatFormatting.GREEN + " Sea Walkers: " + nf.format(seaWalkersSession) + "\n" +
- EnumChatFormatting.DARK_GRAY + " Night Squids: " + nf.format(nightSquidsSession) + "\n" +
- EnumChatFormatting.DARK_AQUA + " Sea Guardians: " + nf.format(seaGuardiansSession) + "\n" +
- EnumChatFormatting.BLUE + " Sea Witches: " + nf.format(seaWitchesSession) + "\n" +
- EnumChatFormatting.GREEN + " Sea Archers: " + nf.format(seaArchersSession) + "\n" +
- EnumChatFormatting.GREEN + " Monster of the Deeps: " + nf.format(monsterOfTheDeepsSession) + "\n" +
- EnumChatFormatting.YELLOW + " Catfishes: " + nf.format(catfishesSession) + "\n" +
- EnumChatFormatting.GOLD + " Carrot Kings: " + nf.format(carrotKingsSession) + "\n" +
- EnumChatFormatting.GRAY + " Sea Leeches: " + nf.format(seaLeechesSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Guardian Defenders: " + nf.format(guardianDefendersSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Deep Sea Protectors: " + nf.format(deepSeaProtectorsSession) + "\n" +
- EnumChatFormatting.GOLD + " Hydras: " + nf.format(hydrasSession) + "\n" +
- EnumChatFormatting.GOLD + " Sea Emperors: " + nf.format(seaEmperorsSession) + "\n" +
+ EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " Fishing Summary:\n" +
+ EnumChatFormatting.AQUA + " Sea Creatures Caught: " + nf.format(seaCreatures) + "\n" +
+ EnumChatFormatting.GOLD + " Good Catches: " + nf.format(goodCatches) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Great Catches: " + nf.format(greatCatches) + "\n\n" +
+ EnumChatFormatting.GRAY + " Squids: " + nf.format(squids) + "\n" +
+ EnumChatFormatting.GREEN + " Sea Walkers: " + nf.format(seaWalkers) + "\n" +
+ EnumChatFormatting.DARK_GRAY + " Night Squids: " + nf.format(nightSquids) + "\n" +
+ EnumChatFormatting.DARK_AQUA + " Sea Guardians: " + nf.format(seaGuardians) + "\n" +
+ EnumChatFormatting.BLUE + " Sea Witches: " + nf.format(seaWitches) + "\n" +
+ EnumChatFormatting.GREEN + " Sea Archers: " + nf.format(seaArchers) + "\n" +
+ EnumChatFormatting.GREEN + " Monster of the Deeps: " + nf.format(monsterOfTheDeeps) + "\n" +
+ EnumChatFormatting.YELLOW + " Catfishes: " + nf.format(catfishes) + "\n" +
+ EnumChatFormatting.GOLD + " Carrot Kings: " + nf.format(carrotKings) + "\n" +
+ EnumChatFormatting.GRAY + " Sea Leeches: " + nf.format(seaLeeches) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Guardian Defenders: " + nf.format(guardianDefenders) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Deep Sea Protectors: " + nf.format(deepSeaProtectors) + "\n" +
+ EnumChatFormatting.GOLD + " Hydras: " + nf.format(hydras) + "\n" +
+ EnumChatFormatting.GOLD + " Sea Emperors: " + nf.format(seaEmperors) + "\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 (empTime == -1) {
- timeBetween = "Never";
- } else {
- timeBetween = Utils.getTimeBetween(empTime, timeNow);
- }
- if (empSCs == -1) {
- bossesBetween = "Never";
- } else {
- bossesBetween = nf.format(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(seaCreatures) + "\n" +
- EnumChatFormatting.GOLD + " Good Catches: " + nf.format(goodCatches) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Great Catches: " + nf.format(greatCatches) + "\n\n" +
- EnumChatFormatting.GRAY + " Squids: " + nf.format(squids) + "\n" +
- EnumChatFormatting.GREEN + " Sea Walkers: " + nf.format(seaWalkers) + "\n" +
- EnumChatFormatting.DARK_GRAY + " Night Squids: " + nf.format(nightSquids) + "\n" +
- EnumChatFormatting.DARK_AQUA + " Sea Guardians: " + nf.format(seaGuardians) + "\n" +
- EnumChatFormatting.BLUE + " Sea Witches: " + nf.format(seaWitches) + "\n" +
- EnumChatFormatting.GREEN + " Sea Archers: " + nf.format(seaArchers) + "\n" +
- EnumChatFormatting.GREEN + " Monster of the Deeps: " + nf.format(monsterOfTheDeeps) + "\n" +
- EnumChatFormatting.YELLOW + " Catfishes: " + nf.format(catfishes) + "\n" +
- EnumChatFormatting.GOLD + " Carrot Kings: " + nf.format(carrotKings) + "\n" +
- EnumChatFormatting.GRAY + " Sea Leeches: " + nf.format(seaLeeches) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Guardian Defenders: " + nf.format(guardianDefenders) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Deep Sea Protectors: " + nf.format(deepSeaProtectors) + "\n" +
- EnumChatFormatting.GOLD + " Hydras: " + nf.format(hydras) + "\n" +
- EnumChatFormatting.GOLD + " Sea Emperors: " + nf.format(seaEmperors) + "\n" +
- EnumChatFormatting.AQUA + " Time Since Sea Emperor: " + timeBetween + "\n" +
- EnumChatFormatting.AQUA + " Sea Creatures Since Sea Emperor: " + bossesBetween + "\n" +
- EnumChatFormatting.DARK_AQUA + EnumChatFormatting.BOLD + " -------------------"));
- } else if (arg1[0].equalsIgnoreCase("catacombs")) {
- if (arg1.length == 1) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /loot catacombs <f1/f2/f3/f4>"));
- return;
- }
- if (arg1[1].equalsIgnoreCase("f1") || arg1[1].equalsIgnoreCase("floor1")) {
- 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(recombobulatorsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
- EnumChatFormatting.BLUE + " Bonzo's Staffs: " + nf.format(bonzoStaffsSession) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f1CoinsSpentSession) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, 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(recombobulators) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
- EnumChatFormatting.BLUE + " Bonzo's Staffs: " + nf.format(bonzoStaffs) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f1CoinsSpent) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f1TimeSpent) + "\n" +
- EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
- } else if (arg1[1].equalsIgnoreCase("f2") || arg1[1].equalsIgnoreCase("floor2")) {
- 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(recombobulatorsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
- EnumChatFormatting.BLUE + " Scarf's Studies: " + nf.format(scarfStudiesSession) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f2CoinsSpentSession) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, 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(recombobulators) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
- EnumChatFormatting.BLUE + " Scarf's Studies: " + nf.format(scarfStudies) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f2CoinsSpent) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f2TimeSpent) + "\n" +
- EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
- } else if (arg1[1].equalsIgnoreCase("f3") || arg1[1].equalsIgnoreCase("floor3")) {
- 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(recombobulatorsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Adaptive Helmets: " + nf.format(adaptiveHelmsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Adaptive Chestplates: " + nf.format(adaptiveChestsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Adaptive Leggings: " + nf.format(adaptiveLegsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Adaptive Boots: " + nf.format(adaptiveBootsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Adaptive Blades: " + nf.format(adaptiveSwordsSession) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f3CoinsSpentSession) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, 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(recombobulators) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Adaptive Helmets: " + nf.format(adaptiveHelms) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Adaptive Chestplates: " + nf.format(adaptiveChests) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Adaptive Leggings: " + nf.format(adaptiveLegs) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Adaptive Boots: " + nf.format(adaptiveBoots) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Adaptive Blades: " + nf.format(adaptiveSwords) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f3CoinsSpent) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f3TimeSpent) + "\n" +
- EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
- } else if (arg1[1].equalsIgnoreCase("f4") || arg1[1].equalsIgnoreCase("floor4")) {
+
+ break;
+ case "mythological":
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(recombobulatorsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Spirit Wings: " + nf.format(spiritWingsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Spirit Bones: " + nf.format(spiritBonesSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Spirit Boots: " + nf.format(spiritBootsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Spirit Swords: " + nf.format(spiritSwordsSession) + "\n" +
- EnumChatFormatting.GOLD + " Spirit Bows: " + nf.format(spiritBowsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Epic Spirit Pets: " + nf.format(epicSpiritPetsSession) + "\n" +
- EnumChatFormatting.GOLD + " Leg Spirit Pets: " + nf.format(legSpiritPetsSession) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f4CoinsSpentSession) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f4TimeSpentSession) + "\n" +
- EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ EnumChatFormatting.YELLOW + EnumChatFormatting.BOLD + " Mythological Event Summary (Current Session):\n" +
+ EnumChatFormatting.YELLOW + " Coins: " + Utils.getMoneySpent(mythCoinsSession) + "\n" +
+ EnumChatFormatting.WHITE + " Griffin Feathers: " + nf.format(griffinFeathersSession) + "\n" +
+ EnumChatFormatting.GOLD + " Crown of Greeds: " + nf.format(crownOfGreedsSession) + "\n" +
+ EnumChatFormatting.AQUA + " Washed-up Souvenirs: " + nf.format(washedUpSouvenirsSession) + "\n" +
+ EnumChatFormatting.RED + " Minos Hunters: " + nf.format(minosHuntersSession) + "\n" +
+ EnumChatFormatting.GRAY + " Siamese Lynxes: " + nf.format(siameseLynxesSession) + "\n" +
+ EnumChatFormatting.RED + " Minotaurs: " + nf.format(minotaursSession) + "\n" +
+ EnumChatFormatting.WHITE + " Gaia Constructs: " + nf.format(gaiaConstructsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Minos Champions: " + nf.format(minosChampionsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Minos Inquisitors: " + nf.format(minosInquisitorsSession) + "\n" +
+ EnumChatFormatting.GOLD + 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(recombobulators) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Spirit Wings: " + nf.format(spiritWings) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Spirit Bones: " + nf.format(spiritBones) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Spirit Boots: " + nf.format(spiritBoots) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Spirit Swords: " + nf.format(spiritSwords) + "\n" +
- EnumChatFormatting.GOLD + " Spirit Bows: " + nf.format(spiritBows) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Epic Spirit Pets: " + nf.format(epicSpiritPets) + "\n" +
- EnumChatFormatting.GOLD + " Leg Spirit Pets: " + nf.format(legSpiritPets) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f4CoinsSpent) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f4TimeSpent) + "\n" +
- EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
- } else if (arg1[1].equalsIgnoreCase("f5") || arg1[1].equalsIgnoreCase("floor5")) {
- 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(recombobulatorsSession) + "\n" +
- EnumChatFormatting.BLUE + " Warped Stones: " + nf.format(warpedStonesSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Helmets: " + nf.format(shadowAssHelmsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Chests: " + nf.format(shadowAssChestsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Legs: " + nf.format(shadowAssLegsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Boots: " + nf.format(shadowAssBootsSession) + "\n" +
- EnumChatFormatting.GOLD + " Livid Daggers: " + nf.format(lividDaggersSession) + "\n" +
- EnumChatFormatting.GOLD + " Shadow Furys: " + nf.format(shadowFurysSession) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f5CoinsSpentSession) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f5TimeSpentSession) + "\n" +
- EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ EnumChatFormatting.YELLOW + EnumChatFormatting.BOLD + " Mythological Event Summary:\n" +
+ EnumChatFormatting.YELLOW + " Coins: " + Utils.getMoneySpent(mythCoins) + "\n" +
+ EnumChatFormatting.WHITE + " Griffin Feathers: " + nf.format(griffinFeathers) + "\n" +
+ EnumChatFormatting.GOLD + " Crown of Greeds: " + nf.format(crownOfGreeds) + "\n" +
+ EnumChatFormatting.AQUA + " Washed-up Souvenirs: " + nf.format(washedUpSouvenirs) + "\n" +
+ EnumChatFormatting.RED + " Minos Hunters: " + nf.format(minosHunters) + "\n" +
+ EnumChatFormatting.GRAY + " Siamese Lynxes: " + nf.format(siameseLynxes) + "\n" +
+ EnumChatFormatting.RED + " Minotaurs: " + nf.format(minotaurs) + "\n" +
+ EnumChatFormatting.WHITE + " Gaia Constructs: " + nf.format(gaiaConstructs) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Minos Champions: " + nf.format(minosChampions) + "\n" +
+ EnumChatFormatting.GOLD + " Minos Inquisitors: " + nf.format(minosInquisitors) + "\n" +
+ EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + "-------------------"));
+ break;
+ case "catacombs":
+ if (arg1.length == 1) {
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /loot catacombs <f1/f2/f3/f4/f5/f6/f7>"));
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(recombobulators) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
- EnumChatFormatting.BLUE + " Warped Stones: " + nf.format(warpedStones) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Helmets: " + nf.format(shadowAssHelms) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Chests: " + nf.format(shadowAssChests) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Legs: " + nf.format(shadowAssLegs) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Boots: " + nf.format(shadowAssBoots) + "\n" +
- EnumChatFormatting.GOLD + " Livid Daggers: " + nf.format(lividDaggers) + "\n" +
- EnumChatFormatting.GOLD + " Shadow Furys: " + nf.format(shadowFurys) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f5CoinsSpent) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f5TimeSpent) + "\n" +
- EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
- } else if (arg1[1].equalsIgnoreCase("f6") || arg1[1].equalsIgnoreCase("floor6")) {
- 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(recombobulatorsSession) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
- EnumChatFormatting.BLUE + " Ancient Roses: " + nf.format(ancientRosesSession) + "\n" +
- EnumChatFormatting.GOLD + " Precursor Eyes: " + nf.format(precursorEyesSession) + "\n" +
- EnumChatFormatting.GOLD + " Giant's Swords: " + nf.format(giantsSwordsSession) + "\n" +
- EnumChatFormatting.GOLD + " Necro Lord Helmets: " + nf.format(necroLordHelmsSession) + "\n" +
- EnumChatFormatting.GOLD + " Necro Lord Chestplates: " + nf.format(necroLordChestsSession) + "\n" +
- EnumChatFormatting.GOLD + " Necro Lord Leggings: " + nf.format(necroLordLegsSession) + "\n" +
- EnumChatFormatting.GOLD + " Necro Lord Boots: " + nf.format(necroLordBootsSession) + "\n" +
- EnumChatFormatting.GOLD + " Necro Swords: " + nf.format(necroSwordsSession) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f6CoinsSpentSession) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f6TimeSpentSession) + "\n" +
- EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
- return;
+ switch (arg1[1].toLowerCase()) {
+ case "f1":
+ case "floor1":
+ 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(recombobulatorsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
+ EnumChatFormatting.BLUE + " Bonzo's Staffs: " + nf.format(bonzoStaffsSession) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f1CoinsSpentSession) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, 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(recombobulators) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
+ EnumChatFormatting.BLUE + " Bonzo's Staffs: " + nf.format(bonzoStaffs) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f1CoinsSpent) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f1TimeSpent) + "\n" +
+ EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
+ break;
+ case "f2":
+ case "floor2":
+ 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(recombobulatorsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
+ EnumChatFormatting.BLUE + " Scarf's Studies: " + nf.format(scarfStudiesSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Adaptive Blades: " + nf.format(adaptiveSwordsSession) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f2CoinsSpentSession) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, 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(recombobulators) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
+ EnumChatFormatting.BLUE + " Scarf's Studies: " + nf.format(scarfStudies) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Adaptive Blades: " + nf.format(adaptiveSwords) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f2CoinsSpent) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f2TimeSpent) + "\n" +
+ EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
+ break;
+ case "f3":
+ case "floor3":
+ 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(recombobulatorsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Adaptive Helmets: " + nf.format(adaptiveHelmsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Adaptive Chestplates: " + nf.format(adaptiveChestsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Adaptive Leggings: " + nf.format(adaptiveLegsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Adaptive Boots: " + nf.format(adaptiveBootsSession) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f3CoinsSpentSession) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, 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(recombobulators) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Adaptive Helmets: " + nf.format(adaptiveHelms) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Adaptive Chestplates: " + nf.format(adaptiveChests) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Adaptive Leggings: " + nf.format(adaptiveLegs) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Adaptive Boots: " + nf.format(adaptiveBoots) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f3CoinsSpent) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f3TimeSpent) + "\n" +
+ EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
+ break;
+ case "f4":
+ case "floor4":
+ 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(recombobulatorsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Spirit Wings: " + nf.format(spiritWingsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Spirit Bones: " + nf.format(spiritBonesSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Spirit Boots: " + nf.format(spiritBootsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Spirit Swords: " + nf.format(spiritSwordsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Spirit Bows: " + nf.format(spiritBowsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Epic Spirit Pets: " + nf.format(epicSpiritPetsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Leg Spirit Pets: " + nf.format(legSpiritPetsSession) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f4CoinsSpentSession) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, 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(recombobulators) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Spirit Wings: " + nf.format(spiritWings) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Spirit Bones: " + nf.format(spiritBones) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Spirit Boots: " + nf.format(spiritBoots) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Spirit Swords: " + nf.format(spiritSwords) + "\n" +
+ EnumChatFormatting.GOLD + " Spirit Bows: " + nf.format(spiritBows) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Epic Spirit Pets: " + nf.format(epicSpiritPets) + "\n" +
+ EnumChatFormatting.GOLD + " Leg Spirit Pets: " + nf.format(legSpiritPets) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f4CoinsSpent) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f4TimeSpent) + "\n" +
+ EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
+ break;
+ case "f5":
+ case "floor5":
+ 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(recombobulatorsSession) + "\n" +
+ EnumChatFormatting.BLUE + " Warped Stones: " + nf.format(warpedStonesSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Helmets: " + nf.format(shadowAssHelmsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Chests: " + nf.format(shadowAssChestsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Legs: " + nf.format(shadowAssLegsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Boots: " + nf.format(shadowAssBootsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Last Breaths: " + nf.format(lastBreathsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Livid Daggers: " + nf.format(lividDaggersSession) + "\n" +
+ EnumChatFormatting.GOLD + " Shadow Furys: " + nf.format(shadowFurysSession) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f5CoinsSpentSession) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, 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(recombobulators) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
+ EnumChatFormatting.BLUE + " Warped Stones: " + nf.format(warpedStones) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Helmets: " + nf.format(shadowAssHelms) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Chests: " + nf.format(shadowAssChests) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Legs: " + nf.format(shadowAssLegs) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Shadow Assassin Boots: " + nf.format(shadowAssBoots) + "\n" +
+ EnumChatFormatting.GOLD + " Last Breaths: " + nf.format(lastBreaths) + "\n" +
+ EnumChatFormatting.GOLD + " Livid Daggers: " + nf.format(lividDaggers) + "\n" +
+ EnumChatFormatting.GOLD + " Shadow Furys: " + nf.format(shadowFurys) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f5CoinsSpent) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f5TimeSpent) + "\n" +
+ EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
+ break;
+ case "f6":
+ case "floor6":
+ 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(recombobulatorsSession) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooksSession) + "\n" +
+ EnumChatFormatting.BLUE + " Ancient Roses: " + nf.format(ancientRosesSession) + "\n" +
+ EnumChatFormatting.GOLD + " Precursor Eyes: " + nf.format(precursorEyesSession) + "\n" +
+ EnumChatFormatting.GOLD + " Giant's Swords: " + nf.format(giantsSwordsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Necro Lord Helmets: " + nf.format(necroLordHelmsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Necro Lord Chestplates: " + nf.format(necroLordChestsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Necro Lord Leggings: " + nf.format(necroLordLegsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Necro Lord Boots: " + nf.format(necroLordBootsSession) + "\n" +
+ EnumChatFormatting.GOLD + " Necro Swords: " + nf.format(necroSwordsSession) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f6CoinsSpentSession) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, 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(recombobulators) + "\n" +
+ EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
+ EnumChatFormatting.BLUE + " Ancient Roses: " + nf.format(ancientRoses) + "\n" +
+ EnumChatFormatting.GOLD + " Precursor Eyes: " + nf.format(precursorEyes) + "\n" +
+ EnumChatFormatting.GOLD + " Giant's Swords: " + nf.format(giantsSwords) + "\n" +
+ EnumChatFormatting.GOLD + " Necro Lord Helmets: " + nf.format(necroLordHelms) + "\n" +
+ EnumChatFormatting.GOLD + " Necro Lord Chestplates: " + nf.format(necroLordChests) + "\n" +
+ EnumChatFormatting.GOLD + " Necro Lord Leggings: " + nf.format(necroLordLegs) + "\n" +
+ EnumChatFormatting.GOLD + " Necro Lord Boots: " + nf.format(necroLordBoots) + "\n" +
+ EnumChatFormatting.GOLD + " Necro Swords: " + nf.format(necroSwords) + "\n" +
+ EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f6CoinsSpent) + "\n" +
+ EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f6TimeSpent) + "\n" +
+ EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
+ break;
+ case "f7":
+ case "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.DARK_PURPLE + " Necron's Handles: " + nf.format(necronsHandlesSession) + "\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.DARK_PURPLE + " Necron's Handles: " + nf.format(necronsHandles) + "\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 + " -------------------"));
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /loot catacombs <f1/f2/f3/f4/f5/f6/f7>"));
}
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" +
- EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs F6 Summary:\n" +
- EnumChatFormatting.GOLD + " Recombobulator 3000s: " + nf.format(recombobulators) + "\n" +
- EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books: " + nf.format(fumingPotatoBooks) + "\n" +
- EnumChatFormatting.BLUE + " Ancient Roses: " + nf.format(ancientRoses) + "\n" +
- EnumChatFormatting.GOLD + " Precursor Eyes: " + nf.format(precursorEyes) + "\n" +
- EnumChatFormatting.GOLD + " Giant's Swords: " + nf.format(giantsSwords) + "\n" +
- EnumChatFormatting.GOLD + " Necro Lord Helmets: " + nf.format(necroLordHelms) + "\n" +
- EnumChatFormatting.GOLD + " Necro Lord Chestplates: " + nf.format(necroLordChests) + "\n" +
- EnumChatFormatting.GOLD + " Necro Lord Leggings: " + nf.format(necroLordLegs) + "\n" +
- EnumChatFormatting.GOLD + " Necro Lord Boots: " + nf.format(necroLordBoots) + "\n" +
- EnumChatFormatting.GOLD + " Necro Swords: " + nf.format(necroSwords) + "\n" +
- EnumChatFormatting.AQUA + " Coins Spent: " + Utils.getMoneySpent(f6CoinsSpent) + "\n" +
- EnumChatFormatting.AQUA + " Time Spent: " + Utils.getTimeBetween(0, f6TimeSpent) + "\n" +
- EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + " -------------------"));
- } else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /loot catacombs <f1/f2/f3/f4/f5/f6>"));
- }
- } else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
}
-
}
}
diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java
index 8b68e7e..76babad 100644
--- a/src/main/java/me/Danker/commands/MoveCommand.java
+++ b/src/main/java/me/Danker/commands/MoveCommand.java
@@ -2,6 +2,7 @@ package me.Danker.commands;
import java.util.List;
+import me.Danker.TheMod;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -9,7 +10,6 @@ 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;
public class MoveCommand extends CommandBase {
@@ -18,6 +18,8 @@ public class MoveCommand extends CommandBase {
public static int[] dungeonTimerXY = {0, 0};
public static int[] skill50XY = {0, 0};
public static int[] lividHpXY = {0, 0};
+ public static int[] cakeTimerXY = {0, 0};
+ public static int[] skillTrackerXY = {0, 0};
@Override
public String getCommandName() {
@@ -26,7 +28,7 @@ public class MoveCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp> <x> <y>";
+ return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker> <x> <y>";
}
@Override
@@ -37,7 +39,7 @@ public class MoveCommand extends CommandBase {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
if (args.length == 1) {
- return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp");
+ return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker");
}
return null;
}
@@ -45,45 +47,64 @@ public class MoveCommand extends CommandBase {
@Override
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
final EntityPlayer player = (EntityPlayer)arg0;
- final ConfigHandler cf = new ConfigHandler();
if (arg1.length < 2) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
- if (arg1[0].equalsIgnoreCase("coords")) {
- coordsXY[0] = Integer.parseInt(arg1[1]);
- coordsXY[1] = Integer.parseInt(arg1[2]);
- cf.writeIntConfig("locations", "coordsX", coordsXY[0]);
- cf.writeIntConfig("locations", "coordsY", coordsXY[1]);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Coords have been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2]));
- } else if (arg1[0].equalsIgnoreCase("display")) {
- displayXY[0] = Integer.parseInt(arg1[1]);
- displayXY[1] = Integer.parseInt(arg1[2]);
- cf.writeIntConfig("locations", "displayX", displayXY[0]);
- cf.writeIntConfig("locations", "displayY", displayXY[1]);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Tracker display has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2]));
- } else if (arg1[0].equalsIgnoreCase("dungeontimer")) {
- dungeonTimerXY[0] = Integer.parseInt(arg1[1]);
- dungeonTimerXY[1] = Integer.parseInt(arg1[2]);
- cf.writeIntConfig("locations", "dungeonTimerX", dungeonTimerXY[0]);
- cf.writeIntConfig("locations", "dungeonTimerY", dungeonTimerXY[1]);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Dungeon timer has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2]));
- } else if (arg1[0].equalsIgnoreCase("skill50")) {
- skill50XY[0] = Integer.parseInt(arg1[1]);
- skill50XY[1] = Integer.parseInt(arg1[2]);
- cf.writeIntConfig("locations", "skill50X", skill50XY[0]);
- cf.writeIntConfig("locations", "skill50Y", skill50XY[1]);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Skill 50 display has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2]));
- } else if (arg1[0].equalsIgnoreCase("lividhp")) {
- lividHpXY[0] = Integer.parseInt(arg1[1]);
- lividHpXY[1] = Integer.parseInt(arg1[2]);
- cf.writeIntConfig("locations", "lividHpX", lividHpXY[0]);
- cf.writeIntConfig("locations", "lividHpY", lividHpXY[1]);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Livid HP has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2]));
- } else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ switch (arg1[0].toLowerCase()) {
+ case "coords":
+ coordsXY[0] = Integer.parseInt(arg1[1]);
+ coordsXY[1] = Integer.parseInt(arg1[2]);
+ ConfigHandler.writeIntConfig("locations", "coordsX", coordsXY[0]);
+ ConfigHandler.writeIntConfig("locations", "coordsY", coordsXY[1]);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Coords have been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2]));
+ break;
+ case "display":
+ displayXY[0] = Integer.parseInt(arg1[1]);
+ displayXY[1] = Integer.parseInt(arg1[2]);
+ ConfigHandler.writeIntConfig("locations", "displayX", displayXY[0]);
+ ConfigHandler.writeIntConfig("locations", "displayY", displayXY[1]);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Tracker display has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2]));
+ break;
+ case "dungeontimer":
+ dungeonTimerXY[0] = Integer.parseInt(arg1[1]);
+ dungeonTimerXY[1] = Integer.parseInt(arg1[2]);
+ ConfigHandler.writeIntConfig("locations", "dungeonTimerX", dungeonTimerXY[0]);
+ ConfigHandler.writeIntConfig("locations", "dungeonTimerY", dungeonTimerXY[1]);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Dungeon timer has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2]));
+ break;
+ case "skill50":
+ skill50XY[0] = Integer.parseInt(arg1[1]);
+ skill50XY[1] = Integer.parseInt(arg1[2]);
+ ConfigHandler.writeIntConfig("locations", "skill50X", skill50XY[0]);
+ ConfigHandler.writeIntConfig("locations", "skill50Y", skill50XY[1]);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill 50 display has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2]));
+ break;
+ case "lividhp":
+ lividHpXY[0] = Integer.parseInt(arg1[1]);
+ lividHpXY[1] = Integer.parseInt(arg1[2]);
+ ConfigHandler.writeIntConfig("locations", "lividHpX", lividHpXY[0]);
+ ConfigHandler.writeIntConfig("locations", "lividHpY", lividHpXY[1]);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Livid HP has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2]));
+ break;
+ case "caketimer":
+ cakeTimerXY[0] = Integer.parseInt(arg1[1]);
+ cakeTimerXY[1] = Integer.parseInt(arg1[2]);
+ ConfigHandler.writeIntConfig("locations", "cakeTimerX", cakeTimerXY[0]);
+ ConfigHandler.writeIntConfig("locations", "cakeTimerY", cakeTimerXY[1]);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Cake timer has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2]));
+ break;
+ case "skilltracker":
+ skillTrackerXY[0] = Integer.parseInt(arg1[1]);
+ skillTrackerXY[1] = Integer.parseInt(arg1[2]);
+ ConfigHandler.writeIntConfig("locations", "skillTrackerX", skillTrackerXY[0]);
+ ConfigHandler.writeIntConfig("locations", "skillTrackerY", skillTrackerXY[1]);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2]));
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(TheMod.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 d6d4122..8e41814 100644
--- a/src/main/java/me/Danker/commands/PetsCommand.java
+++ b/src/main/java/me/Danker/commands/PetsCommand.java
@@ -8,6 +8,7 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
+import me.Danker.TheMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -78,14 +79,12 @@ public class PetsCommand extends CommandBase {
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
// MULTI THREAD DRIFTING
new Thread(() -> {
- APIHandler ah = new APIHandler();
- ConfigHandler cf = new ConfigHandler();
EntityPlayer player = (EntityPlayer) arg0;
// Check key
- String key = cf.getString("api", "APIKey");
+ String key = ConfigHandler.getString("api", "APIKey");
if (key.equals("")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey."));
}
// Get UUID for Hypixel API requests
@@ -94,30 +93,30 @@ public class PetsCommand extends CommandBase {
if (arg1.length == 0) {
username = player.getName();
uuid = player.getUniqueID().toString().replaceAll("[\\-]", "");
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking pets of " + EnumChatFormatting.DARK_GREEN + username));
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking pets of " + TheMod.SECONDARY_COLOUR + username));
} else {
username = arg1[0];
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking pets of " + EnumChatFormatting.DARK_GREEN + username));
- uuid = ah.getUUID(username);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking pets of " + TheMod.SECONDARY_COLOUR + username));
+ uuid = APIHandler.getUUID(username);
}
// Find stats of latest profile
- String latestProfile = ah.getLatestProfileID(uuid, key);
+ 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 = ah.getResponse(profileURL);
+ JsonObject profileResponse = APIHandler.getResponse(profileURL);
if (!profileResponse.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason));
return;
}
System.out.println("Fetching pets...");
JsonArray petsArray = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject().get("pets").getAsJsonArray();
if (petsArray.size() == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + username + " has no pets."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + username + " has no pets."));
return;
}
@@ -160,7 +159,7 @@ public class PetsCommand extends CommandBase {
}
int totalPets = commonPets.size() + uncommonPets.size() + rarePets.size() + epicPets.size() + legendaryPets.size();
- String finalMessage = EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ String finalMessage = TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
EnumChatFormatting.AQUA + " " + username + "'s Pets (" + totalPets + "):\n";
// Loop through pet rarities
@@ -234,7 +233,7 @@ public class PetsCommand extends CommandBase {
finalMessage += messageToAdd + "\n";
}
- finalMessage += EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------";
+ finalMessage += TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------";
player.addChatMessage(new ChatComponentText(finalMessage));
}).start();
diff --git a/src/main/java/me/Danker/commands/ReloadConfigCommand.java b/src/main/java/me/Danker/commands/ReloadConfigCommand.java
index 75ee215..c4ad036 100644
--- a/src/main/java/me/Danker/commands/ReloadConfigCommand.java
+++ b/src/main/java/me/Danker/commands/ReloadConfigCommand.java
@@ -1,12 +1,12 @@
package me.Danker.commands;
+import me.Danker.TheMod;
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;
-import net.minecraft.util.EnumChatFormatting;
public class ReloadConfigCommand extends CommandBase {
@@ -28,9 +28,8 @@ public class ReloadConfigCommand extends CommandBase {
@Override
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
final EntityPlayer player = (EntityPlayer)arg0;
- final ConfigHandler cf = new ConfigHandler();
- cf.reloadConfig();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Reloaded config."));
+ ConfigHandler.reloadConfig();
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Reloaded config."));
}
}
diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java
index 678f486..939ed6e 100644
--- a/src/main/java/me/Danker/commands/ResetLootCommand.java
+++ b/src/main/java/me/Danker/commands/ResetLootCommand.java
@@ -2,6 +2,7 @@ package me.Danker.commands;
import java.util.List;
+import me.Danker.TheMod;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -38,7 +39,7 @@ public class ResetLootCommand extends CommandBase {
if (confirmReset) {
return getListOfStringsMatchingLastWord(args, "confirm", "cancel");
} else {
- return getListOfStringsMatchingLastWord(args, "zombie", "spider", "wolf", "fishing", "catacombs");
+ return getListOfStringsMatchingLastWord(args, "zombie", "spider", "wolf", "fishing", "mythological", "catacombs");
}
}
@@ -47,196 +48,234 @@ public class ResetLootCommand extends CommandBase {
final EntityPlayer player = (EntityPlayer) arg0;
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /resetloot <zombie/spider/wolf/fishing/catacombs>"));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /resetloot <zombie/spider/wolf/fishing/mythological/catacombs>"));
return;
}
if (confirmReset) {
- if (arg1[0].equalsIgnoreCase("confirm")) {
- confirmReset = false;
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Resetting " + resetOption + " tracker..."));
- if (resetOption.equalsIgnoreCase("zombie")) {
- resetZombie();
- } else if (resetOption.equalsIgnoreCase("spider")) {
- resetSpider();
- } else if (resetOption.equalsIgnoreCase("wolf")) {
- resetWolf();
- } else if (resetOption.equalsIgnoreCase("fishing")) {
- resetFishing();
- } else if (resetOption.equalsIgnoreCase("catacombs")) {
- resetCatacombs();
- }
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Reset complete."));
- } else if (arg1[0].equalsIgnoreCase("cancel")) {
- confirmReset = false;
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Reset cancelled."));
- } else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Please confirm the reset of the " + resetOption + " tracker by using /resetloot confirm." +
- EnumChatFormatting.RED + " Cancel by using /resetloot cancel."));
+ switch (arg1[0].toLowerCase()) {
+ case "confirm":
+ confirmReset = false;
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Resetting " + resetOption + " tracker..."));
+ switch (resetOption.toLowerCase()) {
+ case "zombie":
+ resetZombie();
+ break;
+ case "spider":
+ resetSpider();
+ break;
+ case "wolf":
+ resetWolf();
+ break;
+ case "fishing":
+ resetFishing();
+ break;
+ case "mythological":
+ resetMythological();
+ case "catacombs":
+ resetCatacombs();
+ default:
+ System.err.println("Resetting unknown tracker.");
+ return;
+ }
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Reset complete."));
+ break;
+ case "cancel":
+ confirmReset = false;
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Reset cancelled."));
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Please confirm the reset of the " + resetOption + " tracker by using /resetloot confirm." +
+ EnumChatFormatting.RED + " Cancel by using /resetloot cancel."));
}
} else {
- if (arg1[0].equalsIgnoreCase("zombie") || arg1[0].equalsIgnoreCase("spider") || arg1[0].equalsIgnoreCase("wolf") || arg1[0].equalsIgnoreCase("fishing") || arg1[0].equalsIgnoreCase("catacombs")) {
- resetOption = arg1[0];
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Are you sure you want to reset the " + resetOption + " tracker?" +
- " Confirm with " + EnumChatFormatting.GREEN + "/resetloot confirm" + EnumChatFormatting.YELLOW + "." +
- " Cancel by using " + EnumChatFormatting.GREEN + "/resetloot cancel" + EnumChatFormatting.YELLOW + "."));
- confirmReset = true;
- } else if (arg1[0].equalsIgnoreCase("confirm") || arg1[0].equalsIgnoreCase("cancel")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Pick something to reset first."));
- } else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /resetloot <zombie/spider/wolf/fishing/catacombs>"));
+ switch (arg1[0].toLowerCase()) {
+ case "zombie":
+ case "spider":
+ case "wolf":
+ case "fishing":
+ case "mythological":
+ case "catacombs":
+ resetOption = arg1[0];
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Are you sure you want to reset the " + resetOption + " tracker?" +
+ " Confirm with " + TheMod.MAIN_COLOUR + "/resetloot confirm" + EnumChatFormatting.YELLOW + "." +
+ " Cancel by using " + TheMod.MAIN_COLOUR + "/resetloot cancel" + EnumChatFormatting.YELLOW + "."));
+ confirmReset = true;
+ break;
+ case "confirm":
+ case "cancel":
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Pick something to reset first."));
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
}
}
}
- static void resetZombie() {
- LootCommand lc = new LootCommand();
- ConfigHandler cf = new ConfigHandler();
-
- lc.zombieRevsSession = 0;
- lc.zombieRevFleshSession = 0;
- lc.zombieFoulFleshSession = 0;
- lc.zombieFoulFleshDropsSession = 0;
- lc.zombiePestilencesSession = 0;
- lc.zombieUndeadCatasSession = 0;
- lc.zombieBooksSession = 0;
- lc.zombieBeheadedsSession = 0;
- lc.zombieRevCatasSession = 0;
- lc.zombieSnakesSession = 0;
- lc.zombieScythesSession = 0;
- lc.zombieTimeSession = -1;
- lc.zombieBossesSession = -1;
- cf.deleteCategory("zombie");
- cf.reloadConfig();
+ static void resetZombie() {
+ LootCommand.zombieRevsSession = 0;
+ LootCommand.zombieRevFleshSession = 0;
+ LootCommand.zombieFoulFleshSession = 0;
+ LootCommand.zombieFoulFleshDropsSession = 0;
+ LootCommand.zombiePestilencesSession = 0;
+ LootCommand.zombieUndeadCatasSession = 0;
+ LootCommand.zombieBooksSession = 0;
+ LootCommand.zombieBeheadedsSession = 0;
+ LootCommand.zombieRevCatasSession = 0;
+ LootCommand.zombieSnakesSession = 0;
+ LootCommand.zombieScythesSession = 0;
+ LootCommand.zombieTimeSession = -1;
+ LootCommand.zombieBossesSession = -1;
+ ConfigHandler.deleteCategory("zombie");
+ ConfigHandler.reloadConfig();
}
static void resetSpider() {
- LootCommand lc = new LootCommand();
- ConfigHandler cf = new ConfigHandler();
-
- lc.spiderTarantulasSession = 0;
- lc.spiderWebsSession = 0;
- lc.spiderTAPSession = 0;
- lc.spiderTAPDropsSession = 0;
- lc.spiderBitesSession = 0;
- lc.spiderCatalystsSession = 0;
- lc.spiderBooksSession = 0;
- lc.spiderSwattersSession = 0;
- lc.spiderTalismansSession = 0;
- lc.spiderMosquitosSession = 0;
- lc.spiderTimeSession = -1;
- lc.spiderBossesSession = -1;
- cf.deleteCategory("spider");
- cf.reloadConfig();
+ LootCommand.spiderTarantulasSession = 0;
+ LootCommand.spiderWebsSession = 0;
+ LootCommand.spiderTAPSession = 0;
+ LootCommand.spiderTAPDropsSession = 0;
+ LootCommand.spiderBitesSession = 0;
+ LootCommand.spiderCatalystsSession = 0;
+ LootCommand.spiderBooksSession = 0;
+ LootCommand.spiderSwattersSession = 0;
+ LootCommand.spiderTalismansSession = 0;
+ LootCommand.spiderMosquitosSession = 0;
+ LootCommand.spiderTimeSession = -1;
+ LootCommand.spiderBossesSession = -1;
+ ConfigHandler.deleteCategory("spider");
+ ConfigHandler.reloadConfig();
}
static void resetWolf() {
- LootCommand lc = new LootCommand();
- ConfigHandler cf = new ConfigHandler();
- lc.wolfSvensSession = 0;
- lc.wolfTeethSession = 0;
- lc.wolfWheelsSession = 0;
- lc.wolfWheelsDropsSession = 0;
- lc.wolfSpiritsSession = 0;
- lc.wolfBooksSession = 0;
- lc.wolfEggsSession = 0;
- lc.wolfCouturesSession = 0;
- lc.wolfBaitsSession = 0;
- lc.wolfFluxesSession = 0;
- lc.wolfTimeSession = -1;
- lc.wolfBossesSession = -1;
- cf.deleteCategory("wolf");
- cf.reloadConfig();
+ LootCommand.wolfSvensSession = 0;
+ LootCommand.wolfTeethSession = 0;
+ LootCommand.wolfWheelsSession = 0;
+ LootCommand.wolfWheelsDropsSession = 0;
+ LootCommand.wolfSpiritsSession = 0;
+ LootCommand.wolfBooksSession = 0;
+ LootCommand.wolfEggsSession = 0;
+ LootCommand.wolfCouturesSession = 0;
+ LootCommand.wolfBaitsSession = 0;
+ LootCommand.wolfFluxesSession = 0;
+ LootCommand.wolfTimeSession = -1;
+ LootCommand.wolfBossesSession = -1;
+ ConfigHandler.deleteCategory("wolf");
+ ConfigHandler.reloadConfig();
}
static void resetFishing() {
- LootCommand lc = new LootCommand();
- ConfigHandler cf = new ConfigHandler();
- lc.seaCreaturesSession = 0;
- lc.goodCatchesSession = 0;
- lc.greatCatchesSession = 0;
- lc.squidsSession = 0;
- lc.seaWalkersSession = 0;
- lc.nightSquidsSession = 0;
- lc.seaGuardiansSession = 0;
- lc.seaWitchesSession = 0;
- lc.seaArchersSession = 0;
- lc.monsterOfTheDeepsSession = 0;
- lc.catfishesSession = 0;
- lc.carrotKingsSession = 0;
- lc.seaLeechesSession = 0;
- lc.guardianDefendersSession = 0;
- lc.deepSeaProtectorsSession = 0;
- lc.hydrasSession = 0;
- lc.seaEmperorsSession = 0;
- lc.empTimeSession = -1;
- lc.empSCsSession = -1;
- lc.fishingMilestoneSession = 0;
- lc.frozenStevesSession = 0;
- lc.frostyTheSnowmansSession = 0;
- lc.grinchesSession = 0;
- lc.yetisSession = 0;
- lc.yetiTimeSession = -1;
- lc.yetiSCsSession = -1;
- lc.nurseSharksSession = 0;
- lc.blueSharksSession = 0;
- lc.tigerSharksSession = 0;
- lc.greatWhiteSharksSession = 0;
- lc.scarecrowsSession = 0;
- lc.nightmaresSession = 0;
- lc.werewolfsSession = 0;
- lc.phantomFishersSession = 0;
- lc.grimReapersSession = 0;
- cf.deleteCategory("fishing");
- cf.reloadConfig();
+ LootCommand.seaCreaturesSession = 0;
+ LootCommand.goodCatchesSession = 0;
+ LootCommand.greatCatchesSession = 0;
+ LootCommand.squidsSession = 0;
+ LootCommand.seaWalkersSession = 0;
+ LootCommand.nightSquidsSession = 0;
+ LootCommand.seaGuardiansSession = 0;
+ LootCommand.seaWitchesSession = 0;
+ LootCommand.seaArchersSession = 0;
+ LootCommand.monsterOfTheDeepsSession = 0;
+ LootCommand.catfishesSession = 0;
+ LootCommand.carrotKingsSession = 0;
+ LootCommand.seaLeechesSession = 0;
+ LootCommand.guardianDefendersSession = 0;
+ LootCommand.deepSeaProtectorsSession = 0;
+ LootCommand.hydrasSession = 0;
+ LootCommand.seaEmperorsSession = 0;
+ LootCommand.empTimeSession = -1;
+ LootCommand.empSCsSession = -1;
+ LootCommand.fishingMilestoneSession = 0;
+ LootCommand.frozenStevesSession = 0;
+ LootCommand.frostyTheSnowmansSession = 0;
+ LootCommand.grinchesSession = 0;
+ LootCommand.yetisSession = 0;
+ LootCommand.yetiTimeSession = -1;
+ LootCommand.yetiSCsSession = -1;
+ LootCommand.nurseSharksSession = 0;
+ LootCommand.blueSharksSession = 0;
+ LootCommand.tigerSharksSession = 0;
+ LootCommand.greatWhiteSharksSession = 0;
+ LootCommand.scarecrowsSession = 0;
+ LootCommand.nightmaresSession = 0;
+ LootCommand.werewolfsSession = 0;
+ LootCommand.phantomFishersSession = 0;
+ LootCommand.grimReapersSession = 0;
+ ConfigHandler.deleteCategory("fishing");
+ ConfigHandler.reloadConfig();
+ }
+
+ static void resetMythological() {
+ LootCommand.mythCoinsSession = 0;
+ LootCommand.griffinFeathersSession = 0;
+ LootCommand.crownOfGreedsSession = 0;
+ LootCommand.washedUpSouvenirsSession = 0;
+ LootCommand.minosHuntersSession = 0;
+ LootCommand.siameseLynxesSession = 0;
+ LootCommand.minotaursSession = 0;
+ LootCommand.gaiaConstructsSession = 0;
+ LootCommand.minosChampionsSession = 0;
+ LootCommand.minosInquisitorsSession = 0;
+ ConfigHandler.deleteCategory("mythological");
+ ConfigHandler.reloadConfig();
}
static void resetCatacombs() {
- LootCommand lc = new LootCommand();
- ConfigHandler cf = new ConfigHandler();
- lc.recombobulatorsSession = 0;
- lc.fumingPotatoBooksSession = 0;
- lc.bonzoStaffsSession = 0;
- lc.f1CoinsSpentSession = 0;
- lc.f1TimeSpentSession = 0;
- lc.scarfStudiesSession = 0;
- lc.f2CoinsSpentSession = 0;
- lc.f2TimeSpentSession = 0;
- lc.adaptiveHelmsSession = 0;
- lc.adaptiveChestsSession = 0;
- lc.adaptiveLegsSession = 0;
- lc.adaptiveBootsSession = 0;
- lc.adaptiveSwordsSession = 0;
- lc.f3CoinsSpentSession = 0;
- lc.f3TimeSpentSession = 0;
- lc.spiritWingsSession = 0;
- lc.spiritBonesSession = 0;
- lc.spiritBootsSession = 0;
- lc.spiritSwordsSession = 0;
- lc.epicSpiritPetsSession = 0;
- lc.f4CoinsSpentSession = 0;
- lc.f4TimeSpentSession = 0;
- lc.warpedStonesSession = 0;
- lc.shadowAssHelmsSession = 0;
- lc.shadowAssChestsSession = 0;
- lc.shadowAssLegsSession = 0;
- lc.shadowAssBootsSession = 0;
- lc.lividDaggersSession = 0;
- lc.shadowFurysSession = 0;
- lc.f5CoinsSpentSession = 0;
- lc.f5TimeSpentSession = 0;
- lc.ancientRosesSession = 0;
- lc.precursorEyesSession = 0;
- lc.giantsSwordsSession = 0;
- lc.necroLordHelmsSession = 0;
- lc.necroLordChestsSession = 0;
- lc.necroLordLegsSession = 0;
- lc.necroLordBootsSession = 0;
- lc.necroSwordsSession = 0;
- lc.f6CoinsSpentSession = 0;
- lc.f6TimeSpentSession = 0;
- cf.deleteCategory("catacombs");
- cf.reloadConfig();
+ LootCommand.recombobulatorsSession = 0;
+ LootCommand.fumingPotatoBooksSession = 0;
+ LootCommand.bonzoStaffsSession = 0;
+ LootCommand.f1CoinsSpentSession = 0;
+ LootCommand.f1TimeSpentSession = 0;
+ LootCommand.scarfStudiesSession = 0;
+ LootCommand.f2CoinsSpentSession = 0;
+ LootCommand.f2TimeSpentSession = 0;
+ LootCommand.adaptiveHelmsSession = 0;
+ LootCommand.adaptiveChestsSession = 0;
+ LootCommand.adaptiveLegsSession = 0;
+ LootCommand.adaptiveBootsSession = 0;
+ LootCommand.adaptiveSwordsSession = 0;
+ LootCommand.f3CoinsSpentSession = 0;
+ LootCommand.f3TimeSpentSession = 0;
+ LootCommand.spiritWingsSession = 0;
+ LootCommand.spiritBonesSession = 0;
+ LootCommand.spiritBootsSession = 0;
+ LootCommand.spiritSwordsSession = 0;
+ LootCommand.epicSpiritPetsSession = 0;
+ LootCommand.f4CoinsSpentSession = 0;
+ LootCommand.f4TimeSpentSession = 0;
+ LootCommand.warpedStonesSession = 0;
+ LootCommand.shadowAssHelmsSession = 0;
+ LootCommand.shadowAssChestsSession = 0;
+ LootCommand.shadowAssLegsSession = 0;
+ LootCommand.shadowAssBootsSession = 0;
+ LootCommand.lividDaggersSession = 0;
+ LootCommand.shadowFurysSession = 0;
+ LootCommand.f5CoinsSpentSession = 0;
+ LootCommand.f5TimeSpentSession = 0;
+ LootCommand.ancientRosesSession = 0;
+ LootCommand.precursorEyesSession = 0;
+ LootCommand.giantsSwordsSession = 0;
+ LootCommand.necroLordHelmsSession = 0;
+ LootCommand.necroLordChestsSession = 0;
+ LootCommand.necroLordLegsSession = 0;
+ LootCommand.necroLordBootsSession = 0;
+ 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.necronsHandlesSession = 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();
}
}
diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java
index 76a3062..65239c5 100644
--- a/src/main/java/me/Danker/commands/ScaleCommand.java
+++ b/src/main/java/me/Danker/commands/ScaleCommand.java
@@ -2,6 +2,7 @@ package me.Danker.commands;
import java.util.List;
+import me.Danker.TheMod;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -9,7 +10,6 @@ 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;
public class ScaleCommand extends CommandBase {
@@ -18,6 +18,8 @@ public class ScaleCommand extends CommandBase {
public static double dungeonTimerScale;
public static double skill50Scale;
public static double lividHpScale;
+ public static double cakeTimerScale;
+ public static double skillTrackerScale;
@Override
public String getCommandName() {
@@ -26,7 +28,7 @@ public class ScaleCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp> <size (0.1 - 10)>";
+ return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker> <size (0.1 - 10)>";
}
@Override
@@ -37,7 +39,7 @@ public class ScaleCommand extends CommandBase {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
if (args.length == 1) {
- return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp");
+ return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker");
}
return null;
}
@@ -47,39 +49,55 @@ public class ScaleCommand extends CommandBase {
final EntityPlayer player = (EntityPlayer) arg0;
if (arg1.length < 2) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
double scaleAmount = (double) Math.floor(Double.parseDouble(arg1[1]) * 100.0) / 100.0;
if (scaleAmount < 0.1 || scaleAmount > 10.0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Scale multipler can only be between 0.1x and 10x."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Scale multipler can only be between 0.1x and 10x."));
return;
}
- if (arg1[0].equalsIgnoreCase("coords")) {
- coordsScale = scaleAmount;
- ConfigHandler.writeDoubleConfig("scales", "coordsScale", coordsScale);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Coords have been scaled to " + EnumChatFormatting.DARK_GREEN + coordsScale + "x"));
- } else if (arg1[0].equalsIgnoreCase("display")) {
- displayScale = scaleAmount;
- ConfigHandler.writeDoubleConfig("scales", "displayScale", displayScale);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Display has been scaled to " + EnumChatFormatting.DARK_GREEN + displayScale + "x"));
- } else if (arg1[0].equalsIgnoreCase("dungeontimer")) {
- dungeonTimerScale = scaleAmount;
- ConfigHandler.writeDoubleConfig("scales", "dungeonTimerScale", dungeonTimerScale);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Dungeon timer has been scaled to " + EnumChatFormatting.DARK_GREEN + dungeonTimerScale + "x"));
- } else if (arg1[0].equalsIgnoreCase("skill50")) {
- skill50Scale = scaleAmount;
- ConfigHandler.writeDoubleConfig("scales", "skill50Scale", skill50Scale);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Skill 50 display has been scaled to " + EnumChatFormatting.DARK_GREEN + skill50Scale + "x"));
- } else if (arg1[0].equalsIgnoreCase("lividhp")) {
- lividHpScale = scaleAmount;
- ConfigHandler.writeDoubleConfig("scales", "lividHpScale", lividHpScale);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Livid HP has been scaled to " + EnumChatFormatting.DARK_GREEN + lividHpScale + "x"));
- } else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
- }
+ switch (arg1[0].toLowerCase()) {
+ case "coords":
+ coordsScale = scaleAmount;
+ ConfigHandler.writeDoubleConfig("scales", "coordsScale", coordsScale);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Coords have been scaled to " + TheMod.SECONDARY_COLOUR + coordsScale + "x"));
+ break;
+ case "display":
+ displayScale = scaleAmount;
+ ConfigHandler.writeDoubleConfig("scales", "displayScale", displayScale);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Display has been scaled to " + TheMod.SECONDARY_COLOUR + displayScale + "x"));
+ break;
+ case "dungeontimer":
+ dungeonTimerScale = scaleAmount;
+ ConfigHandler.writeDoubleConfig("scales", "dungeonTimerScale", dungeonTimerScale);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Dungeon timer has been scaled to " + TheMod.SECONDARY_COLOUR + dungeonTimerScale + "x"));
+ break;
+ case "skill50":
+ skill50Scale = scaleAmount;
+ ConfigHandler.writeDoubleConfig("scales", "skill50Scale", skill50Scale);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill 50 display has been scaled to " + TheMod.SECONDARY_COLOUR + skill50Scale + "x"));
+ break;
+ case "lividhp":
+ lividHpScale = scaleAmount;
+ ConfigHandler.writeDoubleConfig("scales", "lividHpScale", lividHpScale);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Livid HP has been scaled to " + TheMod.SECONDARY_COLOUR + lividHpScale + "x"));
+ break;
+ case "caketimer":
+ cakeTimerScale = scaleAmount;
+ ConfigHandler.writeDoubleConfig("scales", "cakeTimerScale", cakeTimerScale);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Cake timer has been scaled to " + TheMod.SECONDARY_COLOUR + cakeTimerScale + "x"));
+ break;
+ case "skilltracker":
+ skillTrackerScale = scaleAmount;
+ ConfigHandler.writeDoubleConfig("scales", "skillTrackerScale", skillTrackerScale);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker has been scaled to " + TheMod.SECONDARY_COLOUR + skillTrackerScale + "x"));
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
+ }
}
}
diff --git a/src/main/java/me/Danker/commands/SetkeyCommand.java b/src/main/java/me/Danker/commands/SetkeyCommand.java
index 9fc5228..f2e58e5 100644
--- a/src/main/java/me/Danker/commands/SetkeyCommand.java
+++ b/src/main/java/me/Danker/commands/SetkeyCommand.java
@@ -1,5 +1,6 @@
package me.Danker.commands;
+import me.Danker.TheMod;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -7,7 +8,6 @@ import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
public class SetkeyCommand extends CommandBase implements ICommand {
@@ -31,13 +31,12 @@ public class SetkeyCommand extends CommandBase implements ICommand {
final EntityPlayer player = (EntityPlayer)arg0;
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
- final ConfigHandler cf = new ConfigHandler();
- cf.writeStringConfig("api", "APIKey", arg1[0]);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Set API key to " + EnumChatFormatting.DARK_GREEN + arg1[0]));
+ ConfigHandler.writeStringConfig("api", "APIKey", arg1[0]);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Set API key to " + TheMod.SECONDARY_COLOUR + arg1[0]));
}
}
diff --git a/src/main/java/me/Danker/commands/SkillTrackerCommand.java b/src/main/java/me/Danker/commands/SkillTrackerCommand.java
new file mode 100644
index 0000000..6e6d742
--- /dev/null
+++ b/src/main/java/me/Danker/commands/SkillTrackerCommand.java
@@ -0,0 +1,94 @@
+package me.Danker.commands;
+
+import java.util.List;
+
+import org.apache.commons.lang3.time.StopWatch;
+
+import me.Danker.TheMod;
+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;
+
+public class SkillTrackerCommand extends CommandBase {
+
+ @Override
+ public String getCommandName() {
+ return "skilltracker";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender arg0) {
+ return "/" + getCommandName() + " <start/stop/reset>";
+ }
+
+ @Override
+ public int getRequiredPermissionLevel() {
+ return 0;
+ }
+
+ @Override
+ public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
+ if (args.length == 1) {
+ return getListOfStringsMatchingLastWord(args, "start", "resume", "pause", "stop", "reset", "hide", "show");
+ }
+ return null;
+ }
+
+ @Override
+ public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
+ EntityPlayer player = (EntityPlayer) arg0;
+
+ if (arg1.length < 1) {
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
+ return;
+ }
+
+ switch (arg1[0].toLowerCase()) {
+ case "start":
+ case "resume":
+ if (TheMod.skillStopwatch.isStarted() && TheMod.skillStopwatch.isSuspended()) {
+ TheMod.skillStopwatch.resume();
+ } else if (!TheMod.skillStopwatch.isStarted()) {
+ TheMod.skillStopwatch.start();
+ }
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker started."));
+ break;
+ case "pause":
+ case "stop":
+ if (TheMod.skillStopwatch.isStarted() && !TheMod.skillStopwatch.isSuspended()) {
+ TheMod.skillStopwatch.suspend();
+ } else {
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker paused."));
+ }
+ break;
+ case "reset":
+ TheMod.skillStopwatch = new StopWatch();
+ TheMod.farmingXPGained = 0;
+ TheMod.miningXPGained = 0;
+ TheMod.combatXPGained = 0;
+ TheMod.foragingXPGained = 0;
+ TheMod.fishingXPGained = 0;
+ TheMod.enchantingXPGained = 0;
+ TheMod.alchemyXPGained = 0;
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker reset."));
+ break;
+ case "hide":
+ TheMod.showSkillTracker = false;
+ ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker hidden."));
+ break;
+ case "show":
+ TheMod.showSkillTracker = true;
+ ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill tracker shown."));
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(TheMod.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 50f2767..71905fc 100644
--- a/src/main/java/me/Danker/commands/SkillsCommand.java
+++ b/src/main/java/me/Danker/commands/SkillsCommand.java
@@ -4,6 +4,7 @@ import java.util.List;
import com.google.gson.JsonObject;
+import me.Danker.TheMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -44,14 +45,12 @@ public class SkillsCommand extends CommandBase {
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
// MULTI THREAD DRIFTING
new Thread(() -> {
- APIHandler ah = new APIHandler();
- ConfigHandler cf = new ConfigHandler();
EntityPlayer player = (EntityPlayer) arg0;
// Check key
- String key = cf.getString("api", "APIKey");
+ String key = ConfigHandler.getString("api", "APIKey");
if (key.equals("")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey."));
}
// Get UUID for Hypixel API requests
@@ -60,23 +59,23 @@ public class SkillsCommand extends CommandBase {
if (arg1.length == 0) {
username = player.getName();
uuid = player.getUniqueID().toString().replaceAll("[\\-]", "");
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking skills of " + EnumChatFormatting.DARK_GREEN + username));
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking skills of " + TheMod.SECONDARY_COLOUR + username));
} else {
username = arg1[0];
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking skills of " + EnumChatFormatting.DARK_GREEN + username));
- uuid = ah.getUUID(username);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking skills of " + TheMod.SECONDARY_COLOUR + username));
+ uuid = APIHandler.getUUID(username);
}
// Find stats of latest profile
- String latestProfile = ah.getLatestProfileID(uuid, key);
+ 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 = ah.getResponse(profileURL);
+ JsonObject profileResponse = APIHandler.getResponse(profileURL);
if (!profileResponse.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason));
return;
}
@@ -94,35 +93,35 @@ public class SkillsCommand extends CommandBase {
if (userObject.has("experience_skill_farming") || userObject.has("experience_skill_mining") || userObject.has("experience_skill_combat") || userObject.has("experience_skill_foraging") || userObject.has("experience_skill_fishing") || userObject.has("experience_skill_enchanting") || userObject.has("experience_skill_alchemy")) {
if (userObject.has("experience_skill_farming")) {
- farmingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_farming").getAsDouble());
+ farmingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_farming").getAsDouble(), 60);
farmingLevel = (double) Math.round(farmingLevel * 100) / 100;
}
if (userObject.has("experience_skill_mining")) {
- miningLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_mining").getAsDouble());
+ miningLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_mining").getAsDouble(), 50);
miningLevel = (double) Math.round(miningLevel * 100) / 100;
}
if (userObject.has("experience_skill_combat")) {
- combatLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_combat").getAsDouble());
+ combatLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_combat").getAsDouble(), 50);
combatLevel = (double) Math.round(combatLevel * 100) / 100;
}
if (userObject.has("experience_skill_foraging")) {
- foragingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_foraging").getAsDouble());
+ foragingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_foraging").getAsDouble(), 50);
foragingLevel = (double) Math.round(foragingLevel * 100) / 100;
}
if (userObject.has("experience_skill_fishing")) {
- fishingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_fishing").getAsDouble());
+ fishingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_fishing").getAsDouble(), 50);
fishingLevel = (double) Math.round(fishingLevel * 100) / 100;
}
if (userObject.has("experience_skill_enchanting")) {
- enchantingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_enchanting").getAsDouble());
+ enchantingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_enchanting").getAsDouble(), 50);
enchantingLevel = (double) Math.round(enchantingLevel * 100) / 100;
}
if (userObject.has("experience_skill_alchemy")) {
- alchemyLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_alchemy").getAsDouble());
+ alchemyLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_alchemy").getAsDouble(), 50);
alchemyLevel = (double) Math.round(alchemyLevel * 100) / 100;
}
if (userObject.has("experience_skill_taming")) {
- tamingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_taming").getAsDouble());
+ tamingLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_taming").getAsDouble(), 50);
tamingLevel = (double) Math.round(tamingLevel * 100) / 100;
}
} else {
@@ -130,11 +129,11 @@ 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 = ah.getResponse(playerURL);
+ JsonObject playerObject = APIHandler.getResponse(playerURL);
if (!playerObject.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason));
return;
}
@@ -143,25 +142,25 @@ public class SkillsCommand extends CommandBase {
farmingLevel = achievementObject.get("skyblock_harvester").getAsInt();
}
if (achievementObject.has("skyblock_excavator")) {
- miningLevel = achievementObject.get("skyblock_excavator").getAsInt();
+ miningLevel = Math.min(achievementObject.get("skyblock_excavator").getAsInt(), 50);
}
if (achievementObject.has("skyblock_combat")) {
- combatLevel = achievementObject.get("skyblock_combat").getAsInt();
+ combatLevel = Math.min(achievementObject.get("skyblock_combat").getAsInt(), 50);
}
if (achievementObject.has("skyblock_gatherer")) {
- foragingLevel = achievementObject.get("skyblock_gatherer").getAsInt();
+ foragingLevel = Math.min(achievementObject.get("skyblock_gatherer").getAsInt(), 50);
}
if (achievementObject.has("skyblock_angler")) {
- fishingLevel = achievementObject.get("skyblock_angler").getAsInt();
+ fishingLevel = Math.min(achievementObject.get("skyblock_angler").getAsInt(), 50);
}
if (achievementObject.has("skyblock_augmentation")) {
- enchantingLevel = achievementObject.get("skyblock_augmentation").getAsInt();
+ enchantingLevel = Math.min(achievementObject.get("skyblock_augmentation").getAsInt(), 50);
}
if (achievementObject.has("skyblock_concoctor")) {
- alchemyLevel = achievementObject.get("skyblock_concoctor").getAsInt();
+ alchemyLevel = Math.min(achievementObject.get("skyblock_concoctor").getAsInt(), 50);
}
if (achievementObject.has("skyblock_domesticator")) {
- tamingLevel = achievementObject.get("skyblock_domesticator").getAsInt();
+ tamingLevel = Math.min(achievementObject.get("skyblock_domesticator").getAsInt(), 50);
}
}
@@ -169,19 +168,19 @@ public class SkillsCommand extends CommandBase {
skillAvg = (double) Math.round(skillAvg * 100) / 100;
double trueAvg = (Math.floor(farmingLevel) + Math.floor(miningLevel) + Math.floor(combatLevel) + Math.floor(foragingLevel) + Math.floor(fishingLevel) + Math.floor(enchantingLevel) + Math.floor(alchemyLevel) + Math.floor(tamingLevel)) / 8;
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
EnumChatFormatting.AQUA + " " + username + "'s Skills:\n" +
- EnumChatFormatting.GREEN + " Farming: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + farmingLevel + "\n" +
- EnumChatFormatting.GREEN + " Mining: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + miningLevel + "\n" +
- EnumChatFormatting.GREEN + " Combat: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + combatLevel + "\n" +
- EnumChatFormatting.GREEN + " Foraging: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + foragingLevel + "\n" +
- EnumChatFormatting.GREEN + " Fishing: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + fishingLevel + "\n" +
- EnumChatFormatting.GREEN + " Enchanting: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + enchantingLevel + "\n" +
- EnumChatFormatting.GREEN + " Alchemy: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + alchemyLevel + "\n" +
- EnumChatFormatting.GREEN + " Taming: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + tamingLevel + "\n" +
- EnumChatFormatting.AQUA + " Average Skill Level: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + skillAvg + "\n" +
- EnumChatFormatting.AQUA + " True Average Skill Level: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + trueAvg + "\n" +
- EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------"));
+ TheMod.TYPE_COLOUR + " Farming: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + farmingLevel + "\n" +
+ TheMod.TYPE_COLOUR + " Mining: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + miningLevel + "\n" +
+ TheMod.TYPE_COLOUR + " Combat: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + combatLevel + "\n" +
+ TheMod.TYPE_COLOUR + " Foraging: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + foragingLevel + "\n" +
+ TheMod.TYPE_COLOUR + " Fishing: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + fishingLevel + "\n" +
+ TheMod.TYPE_COLOUR + " Enchanting: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + enchantingLevel + "\n" +
+ TheMod.TYPE_COLOUR + " Alchemy: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + alchemyLevel + "\n" +
+ TheMod.TYPE_COLOUR + " Taming: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + tamingLevel + "\n" +
+ EnumChatFormatting.AQUA + " Average Skill Level: " + TheMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + skillAvg + "\n" +
+ EnumChatFormatting.AQUA + " True Average Skill Level: " + TheMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + trueAvg + "\n" +
+ TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"));
}).start();
}
diff --git a/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java b/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java
index 1c70bc2..aca61ee 100644
--- a/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java
+++ b/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java
@@ -7,6 +7,7 @@ import java.util.Locale;
import com.google.gson.JsonObject;
+import me.Danker.TheMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -43,22 +44,20 @@ public class SkyblockPlayersCommand extends CommandBase {
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
// MULTI THREAD DRIFTING
new Thread(() -> {
- APIHandler ah = new APIHandler();
- ConfigHandler cf = new ConfigHandler();
EntityPlayer player = (EntityPlayer) arg0;
// Check key
- String key = cf.getString("api", "APIKey");
+ String key = ConfigHandler.getString("api", "APIKey");
if (key.equals("")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey."));
}
String playersURL = "https://api.hypixel.net/gameCounts?key=" + key;
System.out.println("Fetching player count...");
- JsonObject playersResponse = ah.getResponse(playersURL);
+ JsonObject playersResponse = APIHandler.getResponse(playersURL);
if (!playersResponse.get("success").getAsBoolean()) {
String reason = playersResponse.get("cause").getAsString();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason));
return;
}
@@ -127,24 +126,24 @@ public class SkyblockPlayersCommand extends CommandBase {
}
NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
- EnumChatFormatting.GREEN + " Hypixel: " + EnumChatFormatting.DARK_GREEN + nf.format(totalPlayers) + "\n" +
- EnumChatFormatting.GREEN + " Skyblock: " + EnumChatFormatting.DARK_GREEN + nf.format(skyblockTotalPlayers) + " / " + Utils.getPercentage(skyblockTotalPlayers, totalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Private Island: " + EnumChatFormatting.DARK_GREEN + nf.format(privateIsland) + " / " + Utils.getPercentage(privateIsland, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Hub: " + EnumChatFormatting.DARK_GREEN + nf.format(hub) + " / " + Utils.getPercentage(hub, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Barn: " + EnumChatFormatting.DARK_GREEN + nf.format(barn) + " / " + Utils.getPercentage(barn, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Mushroom Desert: " + EnumChatFormatting.DARK_GREEN + nf.format(mushroomDesert) + " / " + Utils.getPercentage(mushroomDesert, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Park: " + EnumChatFormatting.DARK_GREEN + nf.format(park) + " / " + Utils.getPercentage(park, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Gold Mine: " + EnumChatFormatting.DARK_GREEN + nf.format(goldMine) + " / " + Utils.getPercentage(goldMine, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Deep Caverns: " + EnumChatFormatting.DARK_GREEN + nf.format(deepCaverns) + " / " + Utils.getPercentage(deepCaverns, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Spider's Den: " + EnumChatFormatting.DARK_GREEN + nf.format(spidersDen) + " / " + Utils.getPercentage(spidersDen, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Blazing Fortress: " + EnumChatFormatting.DARK_GREEN + nf.format(blazingFortress) + " / " + Utils.getPercentage(blazingFortress, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " The End: " + EnumChatFormatting.DARK_GREEN + nf.format(end) + " / " + Utils.getPercentage(end, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Dungeons Hub: " + EnumChatFormatting.DARK_GREEN + nf.format(dungeonsHub) + " / " + Utils.getPercentage(dungeonsHub, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Dungeons: " + EnumChatFormatting.DARK_GREEN + nf.format(dungeons) + " / " + Utils.getPercentage(dungeons, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Dark Auction: " + EnumChatFormatting.DARK_GREEN + nf.format(darkAuction) + " / " + Utils.getPercentage(darkAuction, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.GREEN + " Jerry's Workshop: " + EnumChatFormatting.DARK_GREEN + nf.format(jerry) + " / " + Utils.getPercentage(jerry, skyblockTotalPlayers) + "%\n" +
- EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------"));
+ player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ TheMod.TYPE_COLOUR + " Hypixel: " + TheMod.VALUE_COLOUR + nf.format(totalPlayers) + "\n" +
+ TheMod.TYPE_COLOUR + " Skyblock: " + TheMod.VALUE_COLOUR + nf.format(skyblockTotalPlayers) + " / " + Utils.getPercentage(skyblockTotalPlayers, totalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Private Island: " + TheMod.VALUE_COLOUR + nf.format(privateIsland) + " / " + Utils.getPercentage(privateIsland, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Hub: " + TheMod.VALUE_COLOUR + nf.format(hub) + " / " + Utils.getPercentage(hub, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Barn: " + TheMod.VALUE_COLOUR + nf.format(barn) + " / " + Utils.getPercentage(barn, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Mushroom Desert: " + TheMod.VALUE_COLOUR + nf.format(mushroomDesert) + " / " + Utils.getPercentage(mushroomDesert, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Park: " + TheMod.VALUE_COLOUR + nf.format(park) + " / " + Utils.getPercentage(park, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Gold Mine: " + TheMod.VALUE_COLOUR + nf.format(goldMine) + " / " + Utils.getPercentage(goldMine, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Deep Caverns: " + TheMod.VALUE_COLOUR + nf.format(deepCaverns) + " / " + Utils.getPercentage(deepCaverns, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Spider's Den: " + TheMod.VALUE_COLOUR + nf.format(spidersDen) + " / " + Utils.getPercentage(spidersDen, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Blazing Fortress: " + TheMod.VALUE_COLOUR + nf.format(blazingFortress) + " / " + Utils.getPercentage(blazingFortress, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " The End: " + TheMod.VALUE_COLOUR + nf.format(end) + " / " + Utils.getPercentage(end, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Dungeons Hub: " + TheMod.VALUE_COLOUR + nf.format(dungeonsHub) + " / " + Utils.getPercentage(dungeonsHub, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Dungeons: " + TheMod.VALUE_COLOUR + nf.format(dungeons) + " / " + Utils.getPercentage(dungeons, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Dark Auction: " + TheMod.VALUE_COLOUR + nf.format(darkAuction) + " / " + Utils.getPercentage(darkAuction, skyblockTotalPlayers) + "%\n" +
+ TheMod.TYPE_COLOUR + " Jerry's Workshop: " + TheMod.VALUE_COLOUR + nf.format(jerry) + " / " + Utils.getPercentage(jerry, skyblockTotalPlayers) + "%\n" +
+ TheMod.DELIMITER_COLOUR + EnumChatFormatting.BOLD + " -------------------"));
}).start();
}
diff --git a/src/main/java/me/Danker/commands/SlayerCommand.java b/src/main/java/me/Danker/commands/SlayerCommand.java
index 58ded5e..07119bb 100644
--- a/src/main/java/me/Danker/commands/SlayerCommand.java
+++ b/src/main/java/me/Danker/commands/SlayerCommand.java
@@ -6,6 +6,7 @@ import java.util.Locale;
import com.google.gson.JsonObject;
+import me.Danker.TheMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -46,14 +47,12 @@ public class SlayerCommand extends CommandBase {
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
// MULTI THREAD DRIFTING
new Thread(() -> {
- APIHandler ah = new APIHandler();
- ConfigHandler cf = new ConfigHandler();
EntityPlayer player = (EntityPlayer) arg0;
// Check key
- String key = cf.getString("api", "APIKey");
+ String key = ConfigHandler.getString("api", "APIKey");
if (key.equals("")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey."));
}
// Get UUID for Hypixel API requests
@@ -62,23 +61,23 @@ public class SlayerCommand extends CommandBase {
if (arg1.length == 0) {
username = player.getName();
uuid = player.getUniqueID().toString().replaceAll("[\\-]", "");
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking slayer of " + EnumChatFormatting.DARK_GREEN + username));
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking slayer of " + TheMod.SECONDARY_COLOUR + username));
} else {
username = arg1[0];
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking slayer of " + EnumChatFormatting.DARK_GREEN + username));
- uuid = ah.getUUID(username);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking slayer of " + TheMod.SECONDARY_COLOUR + username));
+ uuid = APIHandler.getUUID(username);
}
// Find stats of latest profile
- String latestProfile = ah.getLatestProfileID(uuid, key);
+ 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 = ah.getResponse(profileURL);
+ JsonObject profileResponse = APIHandler.getResponse(profileURL);
if (!profileResponse.get("success").getAsBoolean()) {
String reason = profileResponse.get("cause").getAsString();
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Failed with reason: " + reason));
return;
}
@@ -101,12 +100,12 @@ public class SlayerCommand extends CommandBase {
}
NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ player.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
EnumChatFormatting.AQUA + " " + username + "'s Total XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + nf.format(zombieXP + spiderXP + wolfXP) + "\n" +
- EnumChatFormatting.AQUA + " Zombie XP: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + nf.format(zombieXP) + "\n" +
- EnumChatFormatting.AQUA + " Spider XP: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + nf.format(spiderXP) + "\n" +
- EnumChatFormatting.AQUA + " Wolf XP: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + nf.format(wolfXP) + "\n" +
- EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------"));
+ TheMod.TYPE_COLOUR + " Zombie XP: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(zombieXP) + "\n" +
+ TheMod.TYPE_COLOUR + " Spider XP: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(spiderXP) + "\n" +
+ TheMod.TYPE_COLOUR + " Wolf XP: " + TheMod.VALUE_COLOUR + EnumChatFormatting.BOLD + nf.format(wolfXP) + "\n" +
+ TheMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"));
}).start();
}
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index f58777c..6e85d58 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -2,6 +2,7 @@ package me.Danker.commands;
import java.util.List;
+import me.Danker.TheMod;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -10,7 +11,6 @@ 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;
public class ToggleCommand extends CommandBase implements ICommand {
public static boolean gpartyToggled;
@@ -31,12 +31,16 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean skill50DisplayToggled;
public static boolean outlineTextToggled;
public static boolean midasStaffMessages;
+ public static boolean healMessages;
+ public static boolean cakeTimerToggled;
+ public static boolean lowHealthNotifyToggled;
public static boolean lividSolverToggled;
// Puzzle Solvers
public static boolean threeManToggled;
public static boolean oruoToggled;
public static boolean blazeToggled;
public static boolean creeperToggled;
+ public static boolean waterToggled;
@Override
public String getCommandName() {
@@ -47,7 +51,8 @@ public class ToggleCommand extends CommandBase implements ICommand {
public String getCommandUsage(ICommandSender arg0) {
return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/" +
"aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" +
- "outlinetext/midasstaffmessages/lividsolver/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/list>";
+ "outlinetext/midasstaffmessages/healmessages/caketimer/lowhealthnotify/lividsolver/threemanpuzzle/oruopuzzle/" +
+ "blazepuzzle/creeperpuzzle/waterpuzzle/list>";
}
@Override
@@ -62,8 +67,8 @@ public class ToggleCommand extends CommandBase implements ICommand {
"splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger",
"sceptremessages", "petcolors", "dungeontimer", "golemalerts",
"expertiselore", "skill50display", "outlinetext", "midasstaffmessages",
- "lividsolver", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle",
- "list");
+ "healmessages", "caketimer", "lowhealthnotify", "lividsolver", "threemanpuzzle",
+ "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "list");
}
return null;
}
@@ -71,131 +76,179 @@ public class ToggleCommand extends CommandBase implements ICommand {
@Override
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
final EntityPlayer player = (EntityPlayer)arg0;
- final ConfigHandler cf = new ConfigHandler();
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
- if (arg1[0].equalsIgnoreCase("gparty")) {
- gpartyToggled = !gpartyToggled;
- cf.writeBooleanConfig("toggles", "GParty", gpartyToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Guild party notifications has been set to " + EnumChatFormatting.DARK_GREEN + gpartyToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("coords")) {
- coordsToggled = !coordsToggled;
- cf.writeBooleanConfig("toggles", "Coords", coordsToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Coord/Angle display has been set to " + EnumChatFormatting.DARK_GREEN + coordsToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("golden")) {
- goldenToggled = !goldenToggled;
- cf.writeBooleanConfig("toggles", "Golden", goldenToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Golden T6 enchants has been set to " + EnumChatFormatting.DARK_GREEN + goldenToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("slayercount")) {
- slayerCountTotal = !slayerCountTotal;
- cf.writeBooleanConfig("toggles", "SlayerCount", slayerCountTotal);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Counting total 20% slayer drops has been set to " + EnumChatFormatting.DARK_GREEN + slayerCountTotal + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("rngesusalerts")) {
- rngesusAlerts = !rngesusAlerts;
- cf.writeBooleanConfig("toggles", "RNGesusAlerts", rngesusAlerts);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Slayer RNGesus alerts has been set to " + EnumChatFormatting.DARK_GREEN + rngesusAlerts + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("splitfishing")) {
- splitFishing = !splitFishing;
- cf.writeBooleanConfig("toggles", "SplitFishing", splitFishing);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Split fishing display has been set to " + EnumChatFormatting.DARK_GREEN + splitFishing + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("chatmaddox")) {
- chatMaddoxToggled = !chatMaddoxToggled;
- cf.writeBooleanConfig("toggles", "ChatMaddox", chatMaddoxToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Chat Maddox menu has been set to " + EnumChatFormatting.DARK_GREEN + chatMaddoxToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("spiritbearalerts")) {
- spiritBearAlerts = !spiritBearAlerts;
- cf.writeBooleanConfig("toggles", "SpiritBearAlerts", spiritBearAlerts);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Spirit Bear alerts have been set to " + EnumChatFormatting.DARK_GREEN + spiritBearAlerts + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("aotd")) {
- aotdToggled = !aotdToggled;
- cf.writeBooleanConfig("toggles", "AOTD", aotdToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Block AOTD ability been set to " + EnumChatFormatting.DARK_GREEN + aotdToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("lividdagger")) {
- lividDaggerToggled = !lividDaggerToggled;
- cf.writeBooleanConfig("toggles", "LividDagger", lividDaggerToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Block Livid Dagger ability been set to " + EnumChatFormatting.DARK_GREEN + lividDaggerToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("sceptremessages")) {
- sceptreMessages = !sceptreMessages;
- cf.writeBooleanConfig("toggles", "SceptreMessages", sceptreMessages);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Spirit Sceptre messages have been set to " + EnumChatFormatting.DARK_GREEN + sceptreMessages + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("petcolors") || arg1[0].equalsIgnoreCase("petcolours")) {
- petColoursToggled = !petColoursToggled;
- cf.writeBooleanConfig("toggles", "PetColors", petColoursToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Pet colours have been set to " + EnumChatFormatting.DARK_GREEN + petColoursToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("dungeontimer")) {
- dungeonTimerToggled = !dungeonTimerToggled;
- cf.writeBooleanConfig("toggles", "DungeonTimer", dungeonTimerToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Dungeon timer has been set to " + EnumChatFormatting.DARK_GREEN + dungeonTimerToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("golemalerts")) {
- golemAlertToggled = !golemAlertToggled;
- cf.writeBooleanConfig("toggles", "GolemAlerts", golemAlertToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Golem spawn alerts has been set to " + EnumChatFormatting.DARK_GREEN + golemAlertToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("expertiselore")) {
- expertiseLoreToggled = !expertiseLoreToggled;
- cf.writeBooleanConfig("toggles", "ExpertiseLore", expertiseLoreToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Expertise in lore has been set to " + EnumChatFormatting.DARK_GREEN + expertiseLoreToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("skill50display")) {
- skill50DisplayToggled = !skill50DisplayToggled;
- cf.writeBooleanConfig("toggles", "Skill50Display", skill50DisplayToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Skill 50 display has been set to " + EnumChatFormatting.DARK_GREEN + skill50DisplayToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("outlinetext")) {
- outlineTextToggled = !outlineTextToggled;
- cf.writeBooleanConfig("toggles", "OutlineText", outlineTextToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Outline displayed text has been set to " + EnumChatFormatting.DARK_GREEN + outlineTextToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("midasstaffmessages")) {
- midasStaffMessages = !midasStaffMessages;
- cf.writeBooleanConfig("toggles", "MidasStaffMessages", midasStaffMessages);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Midas Staff messages have been set to " + EnumChatFormatting.DARK_GREEN + midasStaffMessages + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("lividsolver")) {
- lividSolverToggled = !lividSolverToggled;
- cf.writeBooleanConfig("toggles", "LividSolver", lividSolverToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Livid solver has been set to " + EnumChatFormatting.DARK_GREEN + lividSolverToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("threemanpuzzle")) {
- threeManToggled = !threeManToggled;
- cf.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Three man puzzle solver has been set to " + EnumChatFormatting.DARK_GREEN + threeManToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("oruopuzzle")) {
- oruoToggled = !oruoToggled;
- cf.writeBooleanConfig("toggles", "OruoPuzzle", oruoToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Oruo trivia solver has been set to " + EnumChatFormatting.DARK_GREEN + oruoToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("blazepuzzle")) {
- blazeToggled = !blazeToggled;
- cf.writeBooleanConfig("toggles", "BlazePuzzle", blazeToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Blaze puzzle solver has been set to " + EnumChatFormatting.DARK_GREEN + blazeToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("creeperpuzzle")) {
- creeperToggled = !creeperToggled;
- cf.writeBooleanConfig("creeperpuzzle", "CreeperPuzzle", creeperToggled);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Creeper puzzle solver has been set to " + EnumChatFormatting.DARK_GREEN + creeperToggled + EnumChatFormatting.GREEN + "."));
- } else if (arg1[0].equalsIgnoreCase("list")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Guild party notifications: " + EnumChatFormatting.DARK_GREEN + gpartyToggled + "\n" +
- EnumChatFormatting.GREEN + " Coord/Angle display: " + EnumChatFormatting.DARK_GREEN + coordsToggled + "\n" +
- EnumChatFormatting.GREEN + " Golden T6 enchants: " + EnumChatFormatting.DARK_GREEN + goldenToggled + "\n" +
- EnumChatFormatting.GREEN + " Counting total 20% slayer drops: " + EnumChatFormatting.DARK_GREEN + slayerCountTotal + "\n" +
- EnumChatFormatting.GREEN + " Slayer RNGesus alerts: " + EnumChatFormatting.DARK_GREEN + rngesusAlerts + "\n" +
- EnumChatFormatting.GREEN + " Split fishing display: " + EnumChatFormatting.DARK_GREEN + splitFishing + "\n" +
- EnumChatFormatting.GREEN + " Chat Maddox menu: " + EnumChatFormatting.DARK_GREEN + chatMaddoxToggled + "\n" +
- EnumChatFormatting.GREEN + " Spirit Bear alerts: " + EnumChatFormatting.DARK_GREEN + spiritBearAlerts + "\n" +
- EnumChatFormatting.GREEN + " Block AOTD ability: " + EnumChatFormatting.DARK_GREEN + aotdToggled + "\n" +
- EnumChatFormatting.GREEN + " Block Livid Dagger ability: " + EnumChatFormatting.DARK_GREEN + lividDaggerToggled + "\n" +
- EnumChatFormatting.GREEN + " Spirit Sceptre messages: " + EnumChatFormatting.DARK_GREEN + sceptreMessages + "\n" +
- EnumChatFormatting.GREEN + " Pet colours: " + EnumChatFormatting.DARK_GREEN + petColoursToggled + "\n" +
- EnumChatFormatting.GREEN + " Dungeon timer: " + EnumChatFormatting.DARK_GREEN + dungeonTimerToggled + "\n" +
- EnumChatFormatting.GREEN + " Golem spawn alerts: " + EnumChatFormatting.DARK_GREEN + golemAlertToggled + "\n" +
- EnumChatFormatting.GREEN + " Expertise in lore: " + EnumChatFormatting.DARK_GREEN + expertiseLoreToggled + "\n" +
- EnumChatFormatting.GREEN + " Skill 50 display: " + EnumChatFormatting.DARK_GREEN + skill50DisplayToggled + "\n" +
- EnumChatFormatting.GREEN + " Outline displayed text: " + EnumChatFormatting.DARK_GREEN + outlineTextToggled + "\n" +
- EnumChatFormatting.GREEN + " Midas Staff messages: " + EnumChatFormatting.DARK_GREEN + midasStaffMessages + "\n" +
- EnumChatFormatting.GREEN + " Livid solver: " + EnumChatFormatting.DARK_GREEN + lividSolverToggled + "\n" +
- EnumChatFormatting.GREEN + " Three man puzzle solver: " + EnumChatFormatting.DARK_GREEN + threeManToggled + "\n" +
- EnumChatFormatting.GREEN + " Oruo trivia solver: " + EnumChatFormatting.DARK_GREEN + oruoToggled + "\n" +
- EnumChatFormatting.GREEN + " Blaze puzzle solver: " + EnumChatFormatting.DARK_GREEN + blazeToggled + "\n" +
- EnumChatFormatting.GREEN + " Creeper puzzle solver: " + EnumChatFormatting.DARK_GREEN + creeperToggled));
- } else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ switch (arg1[0].toLowerCase()) {
+ case "gparty":
+ gpartyToggled = !gpartyToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "GParty", gpartyToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Guild party notifications has been set to " + TheMod.SECONDARY_COLOUR + gpartyToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "coords":
+ coordsToggled = !coordsToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "Coords", coordsToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Coord/Angle display has been set to " + TheMod.SECONDARY_COLOUR + coordsToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "golden":
+ goldenToggled = !goldenToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "Golden", goldenToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Golden T6 enchants has been set to " + TheMod.SECONDARY_COLOUR + goldenToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "slayercount":
+ slayerCountTotal = !slayerCountTotal;
+ ConfigHandler.writeBooleanConfig("toggles", "SlayerCount", slayerCountTotal);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Counting total 20% slayer drops has been set to " + TheMod.SECONDARY_COLOUR + slayerCountTotal + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "rngesusalerts":
+ rngesusAlerts = !rngesusAlerts;
+ ConfigHandler.writeBooleanConfig("toggles", "RNGesusAlerts", rngesusAlerts);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Slayer RNGesus alerts has been set to " + TheMod.SECONDARY_COLOUR + rngesusAlerts + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "splitfishing":
+ splitFishing = !splitFishing;
+ ConfigHandler.writeBooleanConfig("toggles", "SplitFishing", splitFishing);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Split fishing display has been set to " + TheMod.SECONDARY_COLOUR + splitFishing + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "chatmaddox":
+ chatMaddoxToggled = !chatMaddoxToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "ChatMaddox", chatMaddoxToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Click screen to open Maddox menu has been set to " + TheMod.SECONDARY_COLOUR + chatMaddoxToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "spiritbearalerts":
+ spiritBearAlerts = !spiritBearAlerts;
+ ConfigHandler.writeBooleanConfig("toggles", "SpiritBearAlerts", spiritBearAlerts);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Spirit Bear alerts have been set to " + TheMod.SECONDARY_COLOUR + spiritBearAlerts + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "aotd":
+ aotdToggled = !aotdToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "AOTD", aotdToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Block AOTD ability been set to " + TheMod.SECONDARY_COLOUR + aotdToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "lividdagger":
+ lividDaggerToggled = !lividDaggerToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "LividDagger", lividDaggerToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Block Livid Dagger ability been set to " + TheMod.SECONDARY_COLOUR + lividDaggerToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "sceptremessages":
+ sceptreMessages = !sceptreMessages;
+ ConfigHandler.writeBooleanConfig("toggles", "SceptreMessages", sceptreMessages);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Spirit Sceptre messages have been set to " + TheMod.SECONDARY_COLOUR + sceptreMessages + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "petcolors":
+ case "petcolours":
+ petColoursToggled = !petColoursToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "PetColors", petColoursToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Pet colours have been set to " + TheMod.SECONDARY_COLOUR + petColoursToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "dungeontimer":
+ dungeonTimerToggled = !dungeonTimerToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "DungeonTimer", dungeonTimerToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Dungeon timer has been set to " + TheMod.SECONDARY_COLOUR + dungeonTimerToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "golemalerts":
+ golemAlertToggled = !golemAlertToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "GolemAlerts", golemAlertToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Golem spawn alerts has been set to " + TheMod.SECONDARY_COLOUR + golemAlertToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "expertiselore":
+ expertiseLoreToggled = !expertiseLoreToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "ExpertiseLore", expertiseLoreToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Expertise in lore has been set to " + TheMod.SECONDARY_COLOUR + expertiseLoreToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "skill50display":
+ skill50DisplayToggled = !skill50DisplayToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "Skill50Display", skill50DisplayToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Skill 50 display has been set to " + TheMod.SECONDARY_COLOUR + skill50DisplayToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "outlinetext":
+ outlineTextToggled = !outlineTextToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "OutlineText", outlineTextToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Outline displayed text has been set to " + TheMod.SECONDARY_COLOUR + outlineTextToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "midasstaffmessages":
+ midasStaffMessages = !midasStaffMessages;
+ ConfigHandler.writeBooleanConfig("toggles", "MidasStaffMessages", midasStaffMessages);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Midas Staff messages have been set to " + TheMod.SECONDARY_COLOUR + midasStaffMessages + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "healmessages":
+ healMessages = !healMessages;
+ ConfigHandler.writeBooleanConfig("toggles", "HealMessages", healMessages);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Heal messages have been set to " + TheMod.SECONDARY_COLOUR + healMessages + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "caketimer":
+ cakeTimerToggled = !cakeTimerToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "CakeTimer", cakeTimerToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Cake timer has been set to " + TheMod.SECONDARY_COLOUR + cakeTimerToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "lowhealthnotify":
+ lowHealthNotifyToggled = !lowHealthNotifyToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "LowHealthNotify", lowHealthNotifyToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Low health notify has been set to " + TheMod.SECONDARY_COLOUR + lowHealthNotifyToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "lividsolver":
+ lividSolverToggled = !lividSolverToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "LividSolver", lividSolverToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Livid solver has been set to " + TheMod.SECONDARY_COLOUR + lividSolverToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "threemanpuzzle":
+ threeManToggled = !threeManToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Three man puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + threeManToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "oruopuzzle":
+ oruoToggled = !oruoToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "OruoPuzzle", oruoToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Oruo trivia solver has been set to " + TheMod.SECONDARY_COLOUR + oruoToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "blazepuzzle":
+ blazeToggled = !blazeToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "BlazePuzzle", blazeToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Blaze puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + blazeToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "creeperpuzzle":
+ creeperToggled = !creeperToggled;
+ ConfigHandler.writeBooleanConfig("creeperpuzzle", "CreeperPuzzle", creeperToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Creeper puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + creeperToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "waterpuzzle":
+ waterToggled = !waterToggled;
+ ConfigHandler.writeBooleanConfig("waterpuzzle", "WaterPuzzle", waterToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Water puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + waterToggled + TheMod.MAIN_COLOUR + "."));
+ break;
+ case "list":
+ player.addChatMessage(new ChatComponentText(TheMod.TYPE_COLOUR + "Guild party notifications: " + TheMod.VALUE_COLOUR + gpartyToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Coord/Angle display: " + TheMod.VALUE_COLOUR + coordsToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Golden T6 enchants: " + TheMod.VALUE_COLOUR + goldenToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Counting total 20% slayer drops: " + TheMod.VALUE_COLOUR + slayerCountTotal + "\n" +
+ TheMod.TYPE_COLOUR + " Slayer RNGesus alerts: " + TheMod.VALUE_COLOUR + rngesusAlerts + "\n" +
+ TheMod.TYPE_COLOUR + " Split fishing display: " + TheMod.VALUE_COLOUR + splitFishing + "\n" +
+ TheMod.TYPE_COLOUR + " Chat Maddox menu: " + TheMod.VALUE_COLOUR + chatMaddoxToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Spirit Bear alerts: " + TheMod.VALUE_COLOUR + spiritBearAlerts + "\n" +
+ TheMod.TYPE_COLOUR + " Block AOTD ability: " + TheMod.VALUE_COLOUR + aotdToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Block Livid Dagger ability: " + TheMod.VALUE_COLOUR + lividDaggerToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Spirit Sceptre messages: " + TheMod.VALUE_COLOUR + sceptreMessages + "\n" +
+ TheMod.TYPE_COLOUR + " Pet colours: " + TheMod.VALUE_COLOUR + petColoursToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Dungeon timer: " + TheMod.VALUE_COLOUR + dungeonTimerToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Golem spawn alerts: " + TheMod.VALUE_COLOUR + golemAlertToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Expertise in lore: " + TheMod.VALUE_COLOUR + expertiseLoreToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Skill 50 display: " + TheMod.VALUE_COLOUR + skill50DisplayToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Outline displayed text: " + TheMod.VALUE_COLOUR + outlineTextToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Midas Staff messages: " + TheMod.VALUE_COLOUR + midasStaffMessages + "\n" +
+ TheMod.TYPE_COLOUR + " Heal messages: " + TheMod.VALUE_COLOUR + healMessages + "\n" +
+ TheMod.TYPE_COLOUR + " Cake timer: " + TheMod.VALUE_COLOUR + cakeTimerToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Low health notify: " + TheMod.VALUE_COLOUR + lowHealthNotifyToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Livid solver: " + TheMod.VALUE_COLOUR + lividSolverToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Three man puzzle solver: " + TheMod.VALUE_COLOUR + threeManToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Oruo trivia solver: " + TheMod.VALUE_COLOUR + oruoToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Blaze puzzle solver: " + TheMod.VALUE_COLOUR + blazeToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Creeper puzzle solver: " + TheMod.VALUE_COLOUR + creeperToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Water puzzle solver: " + TheMod.VALUE_COLOUR + waterToggled));
+ default:
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
}
}
}