aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-10-20 11:57:50 -0400
committerGitHub <noreply@github.com>2020-10-20 11:57:50 -0400
commit5c5ffdbd4379d4c5002cd42c297f90e631566006 (patch)
tree1f203e2c7506697efe5efc326d95567bd7e958a0 /src/main/java/me/Danker/commands
parent20b405f59dcd92df1b4c3cd5b9ac353652ef4405 (diff)
parent1635fe604e6ca2d32d96409165fcc298f1c5b067 (diff)
downloadSkyblockMod-5c5ffdbd4379d4c5002cd42c297f90e631566006.tar.gz
SkyblockMod-5c5ffdbd4379d4c5002cd42c297f90e631566006.tar.bz2
SkyblockMod-5c5ffdbd4379d4c5002cd42c297f90e631566006.zip
1.8v1.8
Merge pull request #22 from bowser0000/development
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r--src/main/java/me/Danker/commands/ArmourCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/BankCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/BlockSlayerCommand.java97
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java16
-rw-r--r--src/main/java/me/Danker/commands/DankerGuiCommand.java32
-rw-r--r--src/main/java/me/Danker/commands/DisplayCommand.java40
-rw-r--r--src/main/java/me/Danker/commands/DungeonsCommand.java110
-rw-r--r--src/main/java/me/Danker/commands/GetkeyCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/GuildOfCommand.java5
-rw-r--r--src/main/java/me/Danker/commands/ImportFishingCommand.java30
-rw-r--r--src/main/java/me/Danker/commands/LobbySkillsCommand.java215
-rw-r--r--src/main/java/me/Danker/commands/LootCommand.java153
-rw-r--r--src/main/java/me/Danker/commands/MoveCommand.java15
-rw-r--r--src/main/java/me/Danker/commands/PetsCommand.java5
-rw-r--r--src/main/java/me/Danker/commands/ReloadConfigCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/ResetLootCommand.java14
-rw-r--r--src/main/java/me/Danker/commands/ScaleCommand.java13
-rw-r--r--src/main/java/me/Danker/commands/SetkeyCommand.java4
-rw-r--r--src/main/java/me/Danker/commands/SkillsCommand.java34
-rw-r--r--src/main/java/me/Danker/commands/SkyblockPlayersCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/SlayerCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java40
22 files changed, 779 insertions, 56 deletions
diff --git a/src/main/java/me/Danker/commands/ArmourCommand.java b/src/main/java/me/Danker/commands/ArmourCommand.java
index 255825c..4fcd282 100644
--- a/src/main/java/me/Danker/commands/ArmourCommand.java
+++ b/src/main/java/me/Danker/commands/ArmourCommand.java
@@ -38,7 +38,7 @@ public class ArmourCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " [name]";
+ return "/" + getCommandName() + " [name]";
}
@Override
diff --git a/src/main/java/me/Danker/commands/BankCommand.java b/src/main/java/me/Danker/commands/BankCommand.java
index 952929f..0d9540c 100644
--- a/src/main/java/me/Danker/commands/BankCommand.java
+++ b/src/main/java/me/Danker/commands/BankCommand.java
@@ -32,7 +32,7 @@ public class BankCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " [name]";
+ return "/" + getCommandName() + " [name]";
}
@Override
diff --git a/src/main/java/me/Danker/commands/BlockSlayerCommand.java b/src/main/java/me/Danker/commands/BlockSlayerCommand.java
new file mode 100644
index 0000000..83a0358
--- /dev/null
+++ b/src/main/java/me/Danker/commands/BlockSlayerCommand.java
@@ -0,0 +1,97 @@
+package me.Danker.commands;
+
+import java.util.List;
+
+import me.Danker.handlers.ConfigHandler;
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.CommandException;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.EnumChatFormatting;
+
+public class BlockSlayerCommand extends CommandBase {
+
+ public static String onlySlayerName = "";
+ public static String onlySlayerNumber = "";
+
+ @Override
+ public String getCommandName() {
+ return "onlyslayer";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender arg0) {
+ return "/" + getCommandName() + " <zombie/spider/wolf> <1/2/3/4>";
+ }
+
+ @Override
+ public int getRequiredPermissionLevel() {
+ return 0;
+ }
+
+ @Override
+ public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
+ if (args.length == 1) {
+ return getListOfStringsMatchingLastWord(args, "zombie", "spider", "wolf");
+ } else if (args.length == 2) {
+ return getListOfStringsMatchingLastWord(args, "1", "2", "3", "4");
+ }
+ return null;
+ }
+
+ @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)));
+ 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;
+ }
+
+ int slayerNumber = Integer.parseInt(arg1[1]);
+ // Just manually set to roman numeral, I don't wanna put a whole converter in here
+ switch (slayerNumber) {
+ case 1:
+ onlySlayerNumber = "I";
+ break;
+ case 2:
+ onlySlayerNumber = "II";
+ break;
+ case 3:
+ onlySlayerNumber = "III";
+ break;
+ case 4:
+ onlySlayerNumber = "IV";
+ break;
+ default:
+ onlySlayerName = "";
+ onlySlayerNumber = "";
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "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));
+ }
+
+}
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index 52db06b..03aa318 100644
--- a/src/main/java/me/Danker/commands/DHelpCommand.java
+++ b/src/main/java/me/Danker/commands/DHelpCommand.java
@@ -17,7 +17,7 @@ public class DHelpCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName();
+ return "/" + getCommandName();
}
@Override
@@ -33,22 +33,26 @@ public class DHelpCommand extends CommandBase {
EnumChatFormatting.AQUA + " <> = Mandatory parameter. [] = Optional parameter.\n" +
EnumChatFormatting.GOLD + " Commands, " + EnumChatFormatting.GREEN + " Keybinds.\n" +
EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" +
- EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\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/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/f(1-4)/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/off> [winter/f(1-4)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays winter sea creatures instead.\n" +
+ EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs> [winter/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/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> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" +
- EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" +
+ EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" +
+ EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50> <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" +
EnumChatFormatting.GOLD + " /guildof [player]" + EnumChatFormatting.AQUA + " - Uses API to get guild name and guild master of a person. If no name is provided, it checks yours.\n" +
EnumChatFormatting.GOLD + " /petsof [player]" + EnumChatFormatting.AQUA + " - Uses API to get pets of a person. If no name is provided, it checks yours.\n" +
EnumChatFormatting.GOLD + " /bank [player]" + EnumChatFormatting.AQUA + " - Uses API to get bank and purse coins of a person. If no name is provided, it checks yours.\n" +
EnumChatFormatting.GOLD + " /armor [player]" + EnumChatFormatting.AQUA + " - Uses API to get armour of a person. If no name is provided, it checks yours.\n" +
+ EnumChatFormatting.GOLD + " /dungeons [player] " + EnumChatFormatting.AQUA + " - Uses API to get dungeon levels of a person. If no name is provided, it checks yours.\n" +
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"));
}
diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java
new file mode 100644
index 0000000..ef39d24
--- /dev/null
+++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java
@@ -0,0 +1,32 @@
+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;
+
+public class DankerGuiCommand extends CommandBase {
+
+ @Override
+ public String getCommandName() {
+ return "dsm";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender arg0) {
+ return null;
+ }
+
+ @Override
+ public int getRequiredPermissionLevel() {
+ return 0;
+ }
+
+ @Override
+ public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
+ TheMod.guiToOpen = "dankergui1";
+ }
+
+}
diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java
index 2f7690d..b96ab2b 100644
--- a/src/main/java/me/Danker/commands/DisplayCommand.java
+++ b/src/main/java/me/Danker/commands/DisplayCommand.java
@@ -13,6 +13,7 @@ import net.minecraft.util.EnumChatFormatting;
public class DisplayCommand extends CommandBase {
public static String display;
+ public static boolean auto;
@Override
public String getCommandName() {
@@ -21,7 +22,7 @@ public class DisplayCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <zombie/spider/wolf/fishing/catacombs/off> [winter/session/f(1-4)]";
+ return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/auto/off> [winter/festival/session/f(1-6)]";
}
@Override
@@ -32,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", "off");
+ return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "auto", "off");
} else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) {
- return getListOfStringsMatchingLastWord(args, "winter", "session");
+ return getListOfStringsMatchingLastWord(args, "winter", "festival", "session");
} else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) {
- return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4");
+ return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6");
} else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) {
return getListOfStringsMatchingLastWord(args, "session");
}
@@ -48,7 +49,7 @@ public class DisplayCommand extends CommandBase {
final EntityPlayer player = (EntityPlayer) arg0;
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: <zombie/spider/wolf/fishing/catacombs/off> [winter/session/f(1-4)]"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
return;
}
@@ -82,6 +83,12 @@ public class DisplayCommand extends CommandBase {
} 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 (showSession) {
display = "fishing_session";
@@ -118,17 +125,36 @@ public class DisplayCommand extends CommandBase {
} 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";
+ }
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /display catacombs <f1/f2/f3/f4>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /display catacombs <f1/f2/f3/f4/f5/f6>"));
return;
}
+ } else if (arg1[0].equalsIgnoreCase("auto")) {
+ auto = true;
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Display set to " + EnumChatFormatting.DARK_GREEN + "auto" + EnumChatFormatting.GREEN + "."));
+ cf.writeBooleanConfig("misc", "autoDisplay", true);
+ return;
} else if (arg1[0].equalsIgnoreCase("off")) {
display = "off";
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: <zombie/spider/wolf/fishing/catacombs/off> [winter/session/f(1-4)]"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "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);
}
diff --git a/src/main/java/me/Danker/commands/DungeonsCommand.java b/src/main/java/me/Danker/commands/DungeonsCommand.java
new file mode 100644
index 0000000..251cf3d
--- /dev/null
+++ b/src/main/java/me/Danker/commands/DungeonsCommand.java
@@ -0,0 +1,110 @@
+package me.Danker.commands;
+
+import java.util.List;
+
+import com.google.gson.JsonObject;
+
+import me.Danker.handlers.APIHandler;
+import me.Danker.handlers.ConfigHandler;
+import me.Danker.utils.Utils;
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.CommandException;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.EnumChatFormatting;
+
+public class DungeonsCommand extends CommandBase {
+
+ @Override
+ public String getCommandName() {
+ return "dungeons";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender arg0) {
+ return "/" + getCommandName() + " [name]";
+ }
+
+ @Override
+ public int getRequiredPermissionLevel() {
+ return 0;
+ }
+
+ @Override
+ public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
+ if (args.length == 1) {
+ return Utils.getMatchingPlayers(args[0]);
+ }
+ return null;
+ }
+
+ @Override
+ public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
+ // MULTI THREAD DRIFTING
+ new Thread(() -> {
+ APIHandler ah = new APIHandler();
+ ConfigHandler cf = new ConfigHandler();
+ EntityPlayer player = (EntityPlayer) arg0;
+
+ // Check key
+ String key = cf.getString("api", "APIKey");
+ if (key.equals("")) {
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
+ }
+
+ // Get UUID for Hypixel API requests
+ String username;
+ String uuid;
+ if (arg1.length == 0) {
+ username = player.getName();
+ uuid = player.getUniqueID().toString().replaceAll("[\\-]", "");
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking dungeon stats of " + EnumChatFormatting.DARK_GREEN + username));
+ } else {
+ username = arg1[0];
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking dungeon stats of " + EnumChatFormatting.DARK_GREEN + username));
+ uuid = ah.getUUID(username);
+ }
+
+ // Find stats of latest profile
+ String latestProfile = ah.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);
+ if (!profileResponse.get("success").getAsBoolean()) {
+ String reason = profileResponse.get("cause").getAsString();
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed with reason: " + reason));
+ return;
+ }
+
+ System.out.println("Fetching 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."));
+ return;
+ }
+
+ double catacombs = Utils.xpToDungeonsLevel(dungeonsObject.get("dungeon_types").getAsJsonObject().get("catacombs").getAsJsonObject().get("experience").getAsDouble());
+ double healer = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("healer").getAsJsonObject().get("experience").getAsDouble());
+ double mage = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("mage").getAsJsonObject().get("experience").getAsDouble());
+ double berserk = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("berserk").getAsJsonObject().get("experience").getAsDouble());
+ double archer = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("archer").getAsJsonObject().get("experience").getAsDouble());
+ double tank = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("tank").getAsJsonObject().get("experience").getAsDouble());
+ String selectedClass = Utils.capitalizeString(dungeonsObject.get("selected_dungeon_class").getAsString());
+
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ EnumChatFormatting.RED + " Catacombs Level: " + catacombs + "\n" +
+ EnumChatFormatting.GOLD + " Selected Class: " + selectedClass + "\n\n" +
+ EnumChatFormatting.YELLOW + " Healer Level: " + healer + "\n" +
+ EnumChatFormatting.LIGHT_PURPLE + " Mage Level: " + mage + "\n" +
+ EnumChatFormatting.RED + " Berserk Level: " + berserk + "\n" +
+ EnumChatFormatting.GREEN + " Archer Level: " + archer + "\n" +
+ EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n" +
+ EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------"));
+ }).start();
+ }
+
+}
diff --git a/src/main/java/me/Danker/commands/GetkeyCommand.java b/src/main/java/me/Danker/commands/GetkeyCommand.java
index f06e66f..8a650de 100644
--- a/src/main/java/me/Danker/commands/GetkeyCommand.java
+++ b/src/main/java/me/Danker/commands/GetkeyCommand.java
@@ -22,7 +22,7 @@ public class GetkeyCommand extends CommandBase implements ICommand {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName();
+ return "/" + getCommandName();
}
@Override
diff --git a/src/main/java/me/Danker/commands/GuildOfCommand.java b/src/main/java/me/Danker/commands/GuildOfCommand.java
index 238ba81..be804c1 100644
--- a/src/main/java/me/Danker/commands/GuildOfCommand.java
+++ b/src/main/java/me/Danker/commands/GuildOfCommand.java
@@ -26,7 +26,7 @@ public class GuildOfCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " [name]";
+ return "/" + getCommandName() + " [name]";
}
@Override
@@ -83,12 +83,14 @@ public class GuildOfCommand extends CommandBase {
String guildName = "N/A";
String guildMaster = "N/A";
+ int players = 0;
// Check if player is in guild
if (!guildResponse.get("guild").isJsonNull()) {
guildName = guildResponse.get("guild").getAsJsonObject().get("name").getAsString();
// Loop through members to find guildmaster
JsonArray guildMembers = guildResponse.get("guild").getAsJsonObject().get("members").getAsJsonArray();
+ players = guildMembers.size();
for (JsonElement member : guildMembers) {
JsonObject memberObject = member.getAsJsonObject();
String memberRank = memberObject.get("rank").getAsString();
@@ -109,6 +111,7 @@ public class GuildOfCommand extends CommandBase {
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 + "-------------------"));
}).start();
}
diff --git a/src/main/java/me/Danker/commands/ImportFishingCommand.java b/src/main/java/me/Danker/commands/ImportFishingCommand.java
index bbbcb9f..9376a8d 100644
--- a/src/main/java/me/Danker/commands/ImportFishingCommand.java
+++ b/src/main/java/me/Danker/commands/ImportFishingCommand.java
@@ -20,7 +20,7 @@ public class ImportFishingCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName();
+ return "/" + getCommandName();
}
@Override
@@ -202,6 +202,30 @@ public class ImportFishingCommand extends CommandBase {
}
lc.seaCreatures += lc.yetis;
+ lc.nurseSharks = 0;
+ if (statsObject.has("kills_nurse_shark")) {
+ lc.nurseSharks = statsObject.get("kills_nurse_shark").getAsInt();
+ }
+ lc.seaCreatures += lc.nurseSharks;
+
+ lc.blueSharks = 0;
+ if (statsObject.has("kills_nurse_shark")) {
+ lc.blueSharks = statsObject.get("kills_blue_shark").getAsInt();
+ }
+ lc.seaCreatures += lc.blueSharks;
+
+ lc.tigerSharks = 0;
+ if (statsObject.has("kills_nurse_shark")) {
+ lc.tigerSharks = statsObject.get("kills_tiger_shark").getAsInt();
+ }
+ lc.seaCreatures += lc.tigerSharks;
+
+ lc.greatWhiteSharks = 0;
+ if (statsObject.has("kills_nurse_shark")) {
+ lc.greatWhiteSharks = statsObject.get("kills_great_white_shark").getAsInt();
+ }
+ lc.seaCreatures += lc.greatWhiteSharks;
+
System.out.println("Writing to config...");
cf.writeIntConfig("fishing", "goodCatch", lc.goodCatches);
cf.writeIntConfig("fishing", "greatCatch", lc.greatCatches);
@@ -225,6 +249,10 @@ public class ImportFishingCommand extends CommandBase {
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."));
}).start();
diff --git a/src/main/java/me/Danker/commands/LobbySkillsCommand.java b/src/main/java/me/Danker/commands/LobbySkillsCommand.java
new file mode 100644
index 0000000..9eb01a3
--- /dev/null
+++ b/src/main/java/me/Danker/commands/LobbySkillsCommand.java
@@ -0,0 +1,215 @@
+package me.Danker.commands;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.stream.Collectors;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+
+import me.Danker.handlers.APIHandler;
+import me.Danker.handlers.ConfigHandler;
+import me.Danker.utils.Utils;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.network.NetworkPlayerInfo;
+import net.minecraft.command.CommandBase;
+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 LobbySkillsCommand extends CommandBase {
+
+ Thread mainThread = null;
+
+ @Override
+ public String getCommandName() {
+ return "lobbyskills";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender arg0) {
+ return "/" + getCommandName();
+ }
+
+ @Override
+ public int getRequiredPermissionLevel() {
+ return 0;
+ }
+
+ @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");
+ if (key.equals("")) {
+ playerSP.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey."));
+ return;
+ }
+
+ mainThread = new Thread(() -> {
+ try {
+ // Create deep copy of players to prevent passing reference and ConcurrentModificationException
+ Collection<NetworkPlayerInfo> players = new ArrayList<NetworkPlayerInfo>(Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap());
+ playerSP.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "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) {
+ if (player.getGameProfile().getName().startsWith("!")) continue;
+ // Manually get latest profile to use reduced requests on extra achievement API
+ String UUID = player.getGameProfile().getId().toString().replaceAll("-", "");
+ long biggestLastSave = 0;
+ int profileIndex = -1;
+ Thread.sleep(600);
+ JsonObject profileResponse = ah.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);
+ continue;
+ }
+ if (profileResponse.get("profiles").isJsonNull()) continue;
+
+ JsonArray profiles = profileResponse.get("profiles").getAsJsonArray();
+ for (int i = 0; i < profiles.size(); i++) {
+ JsonObject profile = profiles.get(i).getAsJsonObject();
+ if (!profile.get("members").getAsJsonObject().get(UUID).getAsJsonObject().has("last_save")) continue;
+ if (profile.get("members").getAsJsonObject().get(UUID).getAsJsonObject().get("last_save").getAsLong() > biggestLastSave) {
+ biggestLastSave = profile.get("members").getAsJsonObject().get(UUID).getAsJsonObject().get("last_save").getAsLong();
+ profileIndex = i;
+ }
+ }
+ if (profileIndex == -1 || biggestLastSave == 0) continue;
+ JsonObject latestProfile = profiles.get(profileIndex).getAsJsonObject().get("members").getAsJsonObject().get(UUID).getAsJsonObject();
+
+ // Get SA
+ double farmingLevel = 0;
+ double miningLevel = 0;
+ double combatLevel = 0;
+ double foragingLevel = 0;
+ double fishingLevel = 0;
+ double enchantingLevel = 0;
+ double alchemyLevel = 0;
+ double tamingLevel = 0;
+
+ 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 = (double) Math.round(farmingLevel * 100) / 100;
+ }
+ if (latestProfile.has("experience_skill_mining")) {
+ miningLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_mining").getAsDouble());
+ miningLevel = (double) Math.round(miningLevel * 100) / 100;
+ }
+ if (latestProfile.has("experience_skill_combat")) {
+ combatLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_combat").getAsDouble());
+ combatLevel = (double) Math.round(combatLevel * 100) / 100;
+ }
+ if (latestProfile.has("experience_skill_foraging")) {
+ foragingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_foraging").getAsDouble());
+ foragingLevel = (double) Math.round(foragingLevel * 100) / 100;
+ }
+ if (latestProfile.has("experience_skill_fishing")) {
+ fishingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_fishing").getAsDouble());
+ fishingLevel = (double) Math.round(fishingLevel * 100) / 100;
+ }
+ if (latestProfile.has("experience_skill_enchanting")) {
+ enchantingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_enchanting").getAsDouble());
+ enchantingLevel = (double) Math.round(enchantingLevel * 100) / 100;
+ }
+ if (latestProfile.has("experience_skill_alchemy")) {
+ alchemyLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_alchemy").getAsDouble());
+ alchemyLevel = (double) Math.round(alchemyLevel * 100) / 100;
+ }
+ if (latestProfile.has("experience_skill_taming")) {
+ tamingLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_taming").getAsDouble());
+ 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);
+
+ if (!playerObject.get("success").getAsBoolean()) {
+ String reason = profileResponse.get("cause").getAsString();
+ System.out.println("User " + player.getGameProfile().getName() + " failed with reason: " + reason);
+ continue;
+ }
+
+ JsonObject achievementObject = playerObject.get("player").getAsJsonObject().get("achievements").getAsJsonObject();
+ if (achievementObject.has("skyblock_harvester")) {
+ farmingLevel = achievementObject.get("skyblock_harvester").getAsInt();
+ }
+ if (achievementObject.has("skyblock_excavator")) {
+ miningLevel = achievementObject.get("skyblock_excavator").getAsInt();
+ }
+ if (achievementObject.has("skyblock_combat")) {
+ combatLevel = achievementObject.get("skyblock_combat").getAsInt();
+ }
+ if (achievementObject.has("skyblock_gatherer")) {
+ foragingLevel = achievementObject.get("skyblock_gatherer").getAsInt();
+ }
+ if (achievementObject.has("skyblock_angler")) {
+ fishingLevel = achievementObject.get("skyblock_angler").getAsInt();
+ }
+ if (achievementObject.has("skyblock_augmentation")) {
+ enchantingLevel = achievementObject.get("skyblock_augmentation").getAsInt();
+ }
+ if (achievementObject.has("skyblock_concoctor")) {
+ alchemyLevel = achievementObject.get("skyblock_concoctor").getAsInt();
+ }
+ if (achievementObject.has("skyblock_domesticator")) {
+ tamingLevel = achievementObject.get("skyblock_domesticator").getAsInt();
+ }
+ }
+
+ double skillAvg = (farmingLevel + miningLevel + combatLevel + foragingLevel + fishingLevel + enchantingLevel + alchemyLevel + tamingLevel) / 8;
+ skillAvg = (double) Math.round(skillAvg * 100) / 100;
+ unsortedSAList.put(player.getGameProfile().getName(), skillAvg); // Put SA in HashMap
+ lobbySkills.add(skillAvg); // Add SA to lobby skills
+ }
+
+ // I have no idea how this works, or even what :: does but this sorts the skill averages
+ Map<String, Double> sortedSAList = unsortedSAList.entrySet().stream()
+ .sorted(Entry.<String, Double>comparingByValue().reversed())
+ .collect(Collectors.toMap(Entry::getKey, Entry::getValue,
+ (e1, e2) -> e1, LinkedHashMap::new));
+
+ 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]);
+ }
+
+ // Get lobby sa
+ double lobbySA = 0;
+ for (int i = 0; i < lobbySkills.size(); i++) {
+ lobbySA += lobbySkills.get(i);
+ }
+ 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 + " -------------------"));
+ } catch (InterruptedException ex) {
+ System.out.println("Current skill average list: " + unsortedSAList.toString());
+ Thread.currentThread().interrupt();
+ System.out.println("Interrupted /lobbyskills thread.");
+ }
+
+ });
+ mainThread.start();
+ }
+
+}
diff --git a/src/main/java/me/Danker/commands/LootCommand.java b/src/main/java/me/Danker/commands/LootCommand.java
index a877a8d..bbe4f73 100644
--- a/src/main/java/me/Danker/commands/LootCommand.java
+++ b/src/main/java/me/Danker/commands/LootCommand.java
@@ -83,6 +83,11 @@ public class LootCommand extends CommandBase {
public static int yetis;
public static double yetiTime;
public static int yetiSCs;
+ // Fishing Festival
+ public static int nurseSharks;
+ public static int blueSharks;
+ public static int tigerSharks;
+ public static int greatWhiteSharks;
// Catacombs Dungeons
public static int recombobulators;
@@ -113,6 +118,27 @@ public class LootCommand extends CommandBase {
public static int legSpiritPets;
public static double f4CoinsSpent;
public static double f4TimeSpent;
+ // F5
+ public static int warpedStones;
+ public static int shadowAssHelms;
+ public static int shadowAssChests;
+ public static int shadowAssLegs;
+ public static int shadowAssBoots;
+ public static int lividDaggers;
+ public static int shadowFurys;
+ public static double f5CoinsSpent;
+ public static double f5TimeSpent;
+ // F6
+ public static int ancientRoses;
+ public static int precursorEyes;
+ public static int giantsSwords;
+ public static int necroLordHelms;
+ public static int necroLordChests;
+ public static int necroLordLegs;
+ public static int necroLordBoots;
+ public static int necroSwords;
+ public static double f6CoinsSpent;
+ public static double f6TimeSpent;
// Single sessions (No config saves)
// Wolf
@@ -182,8 +208,13 @@ public class LootCommand extends CommandBase {
public static int frostyTheSnowmansSession = 0;
public static int grinchesSession = 0;
public static int yetisSession = 0;
- public static double yetiTimeSession = 0;
- public static int yetiSCsSession = 0;
+ public static double yetiTimeSession = -1;
+ public static int yetiSCsSession = -1;
+ // Fishing Festival
+ public static int nurseSharksSession = 0;
+ public static int blueSharksSession = 0;
+ public static int tigerSharksSession = 0;
+ public static int greatWhiteSharksSession = 0;
// Catacombs Dungeons
public static int recombobulatorsSession = 0;
@@ -214,6 +245,27 @@ public class LootCommand extends CommandBase {
public static int legSpiritPetsSession = 0;
public static double f4CoinsSpentSession = 0;
public static double f4TimeSpentSession = 0;
+ // F5
+ public static int warpedStonesSession = 0;
+ public static int shadowAssHelmsSession = 0;
+ public static int shadowAssChestsSession = 0;
+ public static int shadowAssLegsSession = 0;
+ public static int shadowAssBootsSession = 0;
+ public static int lividDaggersSession = 0;
+ public static int shadowFurysSession = 0;
+ public static double f5CoinsSpentSession = 0;
+ public static double f5TimeSpentSession = 0;
+ // F6
+ public static int ancientRosesSession = 0;
+ public static int precursorEyesSession = 0;
+ public static int giantsSwordsSession = 0;
+ public static int necroLordHelmsSession = 0;
+ public static int necroLordChestsSession = 0;
+ public static int necroLordLegsSession = 0;
+ public static int necroLordBootsSession = 0;
+ public static int necroSwordsSession = 0;
+ public static double f6CoinsSpentSession = 0;
+ public static double f6TimeSpentSession = 0;
@Override
public String getCommandName() {
@@ -222,7 +274,7 @@ public class LootCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <zombie/spider/wolf/fishing/catacombs> [winter/f(1-4)/session]";
+ return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs> [winter/festival/f(1-6)/session]";
}
@Override
@@ -235,9 +287,9 @@ public class LootCommand extends CommandBase {
if (args.length == 1) {
return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs");
} else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) {
- return getListOfStringsMatchingLastWord(args, "winter", "session");
+ return getListOfStringsMatchingLastWord(args, "winter", "festival", "session");
} else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) {
- return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4");
+ return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6");
} else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) {
return getListOfStringsMatchingLastWord(args, "session");
}
@@ -249,7 +301,7 @@ public class LootCommand extends CommandBase {
final EntityPlayer player = (EntityPlayer) arg0;
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /loot <zombie/spider/wolf/fishing/catacombs> [winter/f(1-4)/session]"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
return;
}
@@ -507,6 +559,25 @@ public class LootCommand extends CommandBase {
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 + " -------------------"));
}
}
@@ -685,11 +756,77 @@ public class LootCommand extends CommandBase {
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 + " -------------------"));
+ 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;
+ }
+ 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>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /loot catacombs <f1/f2/f3/f4/f5/f6>"));
}
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /loot <zombie/spider/wolf/fishing/catacombs> [winter/f(1-4)/session]"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
}
}
diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java
index 24396ff..7fb9acd 100644
--- a/src/main/java/me/Danker/commands/MoveCommand.java
+++ b/src/main/java/me/Danker/commands/MoveCommand.java
@@ -16,6 +16,7 @@ public class MoveCommand extends CommandBase {
public static int[] coordsXY = {0, 0};
public static int[] displayXY = {0, 0};
public static int[] dungeonTimerXY = {0, 0};
+ public static int[] skill50XY = {0, 0};
@Override
public String getCommandName() {
@@ -24,7 +25,7 @@ public class MoveCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <coords/display/dungeontimer> <x> <y>";
+ return "/" + getCommandName() + " <coords/display/dungeontimer/skill50> <x> <y>";
}
@Override
@@ -35,7 +36,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");
+ return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50");
}
return null;
}
@@ -46,7 +47,7 @@ public class MoveCommand extends CommandBase {
final ConfigHandler cf = new ConfigHandler();
if (arg1.length < 2) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display/dungeontimer> <x> <y>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
return;
}
@@ -68,8 +69,14 @@ public class MoveCommand extends CommandBase {
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 {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display/dungeontimer> <x> <y>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
}
}
diff --git a/src/main/java/me/Danker/commands/PetsCommand.java b/src/main/java/me/Danker/commands/PetsCommand.java
index c697689..d6d4122 100644
--- a/src/main/java/me/Danker/commands/PetsCommand.java
+++ b/src/main/java/me/Danker/commands/PetsCommand.java
@@ -58,7 +58,7 @@ public class PetsCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " [name]";
+ return "/" + getCommandName() + " [name]";
}
@Override
@@ -159,8 +159,9 @@ public class PetsCommand extends CommandBase {
}
}
+ int totalPets = commonPets.size() + uncommonPets.size() + rarePets.size() + epicPets.size() + legendaryPets.size();
String finalMessage = EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" +
- EnumChatFormatting.AQUA + " " + username + "'s Pets:\n";
+ EnumChatFormatting.AQUA + " " + username + "'s Pets (" + totalPets + "):\n";
// Loop through pet rarities
for (JsonObject legPet : legendaryPets) {
diff --git a/src/main/java/me/Danker/commands/ReloadConfigCommand.java b/src/main/java/me/Danker/commands/ReloadConfigCommand.java
index 122f1c1..75ee215 100644
--- a/src/main/java/me/Danker/commands/ReloadConfigCommand.java
+++ b/src/main/java/me/Danker/commands/ReloadConfigCommand.java
@@ -17,7 +17,7 @@ public class ReloadConfigCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName();
+ return "/" + getCommandName();
}
@Override
diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java
index dd540d6..bf5b218 100644
--- a/src/main/java/me/Danker/commands/ResetLootCommand.java
+++ b/src/main/java/me/Danker/commands/ResetLootCommand.java
@@ -23,7 +23,7 @@ public class ResetLootCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + "<zombie/spider/wolf/fishing/catacombs/confirm/cancel>";
+ return "/" + getCommandName() + "<zombie/spider/wolf/fishing/catacombs/confirm/cancel>";
}
@Override
@@ -178,6 +178,10 @@ public class ResetLootCommand extends CommandBase {
lc.yetisSession = 0;
lc.yetiTimeSession = -1;
lc.yetiSCsSession = -1;
+ lc.nurseSharksSession = 0;
+ lc.blueSharksSession = 0;
+ lc.tigerSharksSession = 0;
+ lc.greatWhiteSharksSession = 0;
cf.deleteCategory("fishing");
cf.reloadConfig();
}
@@ -207,6 +211,14 @@ public class ResetLootCommand extends CommandBase {
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.f5CoinsSpentSession = 0;
+ lc.f5TimeSpentSession = 0;
cf.deleteCategory("catacombs");
cf.reloadConfig();
}
diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java
index 7b56b6d..5f21b77 100644
--- a/src/main/java/me/Danker/commands/ScaleCommand.java
+++ b/src/main/java/me/Danker/commands/ScaleCommand.java
@@ -16,6 +16,7 @@ public class ScaleCommand extends CommandBase {
public static double coordsScale;
public static double displayScale;
public static double dungeonTimerScale;
+ public static double skill50Scale;
@Override
public String getCommandName() {
@@ -24,7 +25,7 @@ public class ScaleCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <coords/display/dungeontimer> <size (0.1 - 10)>";
+ return "/" + getCommandName() + " <coords/display/dungeontimer/skill50> <size (0.1 - 10)>";
}
@Override
@@ -35,7 +36,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");
+ return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50");
}
return null;
}
@@ -45,7 +46,7 @@ public class ScaleCommand extends CommandBase {
final EntityPlayer player = (EntityPlayer) arg0;
if (arg1.length < 2) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /scale <coords/display/dungeontimer> <size (0.1 - 10)>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
return;
}
@@ -67,8 +68,12 @@ public class ScaleCommand extends CommandBase {
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 {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /scale <coords/display/dungeontimer> <size (0.1 - 10)>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
}
}
diff --git a/src/main/java/me/Danker/commands/SetkeyCommand.java b/src/main/java/me/Danker/commands/SetkeyCommand.java
index f68ff75..9fc5228 100644
--- a/src/main/java/me/Danker/commands/SetkeyCommand.java
+++ b/src/main/java/me/Danker/commands/SetkeyCommand.java
@@ -18,7 +18,7 @@ public class SetkeyCommand extends CommandBase implements ICommand {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <key>";
+ return "/" + getCommandName() + " <key>";
}
@Override
@@ -31,7 +31,7 @@ public class SetkeyCommand extends CommandBase implements ICommand {
final EntityPlayer player = (EntityPlayer)arg0;
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /setkey <key>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
return;
}
diff --git a/src/main/java/me/Danker/commands/SkillsCommand.java b/src/main/java/me/Danker/commands/SkillsCommand.java
index 8128c90..50f2767 100644
--- a/src/main/java/me/Danker/commands/SkillsCommand.java
+++ b/src/main/java/me/Danker/commands/SkillsCommand.java
@@ -24,7 +24,7 @@ public class SkillsCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " [name]";
+ return "/" + getCommandName() + " [name]";
}
@Override
@@ -139,14 +139,30 @@ public class SkillsCommand extends CommandBase {
}
JsonObject achievementObject = playerObject.get("player").getAsJsonObject().get("achievements").getAsJsonObject();
- farmingLevel = achievementObject.get("skyblock_harvester").getAsInt();
- miningLevel = achievementObject.get("skyblock_excavator").getAsInt();
- combatLevel = achievementObject.get("skyblock_combat").getAsInt();
- foragingLevel = achievementObject.get("skyblock_gatherer").getAsInt();
- fishingLevel = achievementObject.get("skyblock_angler").getAsInt();
- enchantingLevel = achievementObject.get("skyblock_augmentation").getAsInt();
- alchemyLevel = achievementObject.get("skyblock_concoctor").getAsInt();
- tamingLevel = achievementObject.get("skyblock_domesticator").getAsInt();
+ if (achievementObject.has("skyblock_harvester")) {
+ farmingLevel = achievementObject.get("skyblock_harvester").getAsInt();
+ }
+ if (achievementObject.has("skyblock_excavator")) {
+ miningLevel = achievementObject.get("skyblock_excavator").getAsInt();
+ }
+ if (achievementObject.has("skyblock_combat")) {
+ combatLevel = achievementObject.get("skyblock_combat").getAsInt();
+ }
+ if (achievementObject.has("skyblock_gatherer")) {
+ foragingLevel = achievementObject.get("skyblock_gatherer").getAsInt();
+ }
+ if (achievementObject.has("skyblock_angler")) {
+ fishingLevel = achievementObject.get("skyblock_angler").getAsInt();
+ }
+ if (achievementObject.has("skyblock_augmentation")) {
+ enchantingLevel = achievementObject.get("skyblock_augmentation").getAsInt();
+ }
+ if (achievementObject.has("skyblock_concoctor")) {
+ alchemyLevel = achievementObject.get("skyblock_concoctor").getAsInt();
+ }
+ if (achievementObject.has("skyblock_domesticator")) {
+ tamingLevel = achievementObject.get("skyblock_domesticator").getAsInt();
+ }
}
double skillAvg = (farmingLevel + miningLevel + combatLevel + foragingLevel + fishingLevel + enchantingLevel + alchemyLevel + tamingLevel) / 8;
diff --git a/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java b/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java
index ee3c522..1c70bc2 100644
--- a/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java
+++ b/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java
@@ -31,7 +31,7 @@ public class SkyblockPlayersCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return null;
+ return "/" + getCommandName();
}
@Override
diff --git a/src/main/java/me/Danker/commands/SlayerCommand.java b/src/main/java/me/Danker/commands/SlayerCommand.java
index 0aba569..58ded5e 100644
--- a/src/main/java/me/Danker/commands/SlayerCommand.java
+++ b/src/main/java/me/Danker/commands/SlayerCommand.java
@@ -26,7 +26,7 @@ public class SlayerCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " [name]";
+ return "/" + getCommandName() + " [name]";
}
@Override
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index b1e5270..2835db6 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -22,9 +22,14 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean chatMaddoxToggled;
public static boolean spiritBearAlerts;
public static boolean aotdToggled;
+ public static boolean lividDaggerToggled;
public static boolean sceptreMessages;
public static boolean petColoursToggled;
public static boolean dungeonTimerToggled;
+ public static boolean golemAlertToggled;
+ public static boolean expertiseLoreToggled;
+ public static boolean skill50DisplayToggled;
+ public static boolean outlineTextToggled;
@Override
public String getCommandName() {
@@ -33,7 +38,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/aotd/sceptremessages/petcolors/dungeontimer/list>";
+ return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/list>";
}
@Override
@@ -44,7 +49,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
if (args.length == 1) {
- return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "sceptremessages", "petcolors", "dungeontimer", "list");
+ return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "list");
}
return null;
}
@@ -55,7 +60,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
final ConfigHandler cf = new ConfigHandler();
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/list>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
return;
}
@@ -95,6 +100,10 @@ public class ToggleCommand extends CommandBase implements ICommand {
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);
@@ -107,6 +116,22 @@ public class ToggleCommand extends CommandBase implements ICommand {
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("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" +
@@ -117,11 +142,16 @@ public class ToggleCommand extends CommandBase implements ICommand {
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));
+ 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));
} else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/list>"));
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
}
}
}