aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/DankerGuiCommand.java1
-rw-r--r--src/main/java/me/Danker/commands/SkillTrackerCommand.java107
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java11
4 files changed, 69 insertions, 52 deletions
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index f16f598..d6ce908 100644
--- a/src/main/java/me/Danker/commands/DHelpCommand.java
+++ b/src/main/java/me/Danker/commands/DHelpCommand.java
@@ -34,7 +34,7 @@ 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/flowerweapons/sceptremessages/midasstaffmessages/implosionmessages/healmessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/caketimer/lowhealthnotify/lividsolver/stopsalvagestarred/notifyslayerslain/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/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/flowerweapons/sceptremessages/midasstaffmessages/implosionmessages/healmessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/caketimer/lowhealthnotify/lividsolver/stopsalvagestarred/notifyslayerslain/autoskilltracker/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
EnumChatFormatting.GOLD + " /setkey <key>" + EnumChatFormatting.AQUA + " - Sets API key.\n" +
EnumChatFormatting.GOLD + " /getkey" + EnumChatFormatting.AQUA + " - Returns key set with /setkey and copies it to your clipboard.\n" +
EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs/mythological/> [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" +
diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java
index 380086a..d596d65 100644
--- a/src/main/java/me/Danker/commands/DankerGuiCommand.java
+++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java
@@ -61,6 +61,7 @@ public class DankerGuiCommand extends CommandBase {
debug.append("[lividsolver][").append(ToggleCommand.lividSolverToggled).append("]\n");
debug.append("[stopsalvagestarred][").append(ToggleCommand.stopSalvageStarredToggled).append("]\n");
debug.append("[notifyslayerslain][").append(ToggleCommand.notifySlayerSlainToggled).append("]\n");
+ debug.append("[autoskilltracker][").append(ToggleCommand.autoSkillTrackerToggled).append("]\n");
debug.append("[threemanpuzzle][").append(ToggleCommand.threeManToggled).append("]\n");
debug.append("[oruopuzzle][").append(ToggleCommand.oruoToggled).append("]\n");
debug.append("[blazepuzzle][").append(ToggleCommand.blazeToggled).append("]\n");
diff --git a/src/main/java/me/Danker/commands/SkillTrackerCommand.java b/src/main/java/me/Danker/commands/SkillTrackerCommand.java
index 7642070..e341f43 100644
--- a/src/main/java/me/Danker/commands/SkillTrackerCommand.java
+++ b/src/main/java/me/Danker/commands/SkillTrackerCommand.java
@@ -13,6 +13,7 @@ import org.apache.commons.lang3.time.StopWatch;
import java.util.List;
public class SkillTrackerCommand extends CommandBase {
+ public static boolean running = false;
@Override
public String getCommandName() {
@@ -39,55 +40,63 @@ public class SkillTrackerCommand extends CommandBase {
@Override
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
- EntityPlayer player = (EntityPlayer) arg0;
-
- if (arg1.length < 1) {
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
- return;
- }
-
- switch (arg1[0].toLowerCase()) {
- case "start":
- case "resume":
- if (DankersSkyblockMod.skillStopwatch.isStarted() && DankersSkyblockMod.skillStopwatch.isSuspended()) {
- DankersSkyblockMod.skillStopwatch.resume();
- } else if (!DankersSkyblockMod.skillStopwatch.isStarted()) {
- DankersSkyblockMod.skillStopwatch.start();
- }
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started."));
- break;
- case "pause":
- case "stop":
- if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) {
- DankersSkyblockMod.skillStopwatch.suspend();
- } else {
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker paused."));
- }
- break;
- case "reset":
- DankersSkyblockMod.skillStopwatch = new StopWatch();
- DankersSkyblockMod.farmingXPGained = 0;
- DankersSkyblockMod.miningXPGained = 0;
- DankersSkyblockMod.combatXPGained = 0;
- DankersSkyblockMod.foragingXPGained = 0;
- DankersSkyblockMod.fishingXPGained = 0;
- DankersSkyblockMod.enchantingXPGained = 0;
- DankersSkyblockMod.alchemyXPGained = 0;
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker reset."));
- break;
- case "hide":
- DankersSkyblockMod.showSkillTracker = false;
- ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false);
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker hidden."));
- break;
- case "show":
- DankersSkyblockMod.showSkillTracker = true;
- ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true);
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker shown."));
- break;
- default:
+ // MULTI THREAD DRIFTING
+ new Thread(() -> {
+ EntityPlayer player = (EntityPlayer) arg0;
+
+ if (arg1.length < 1) {
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
- }
- }
+ return;
+ }
+
+ try {
+ Thread.sleep(200);
+ switch (arg1[0].toLowerCase()) {
+ case "start":
+ case "resume":
+ if (DankersSkyblockMod.skillStopwatch.isStarted() && DankersSkyblockMod.skillStopwatch.isSuspended()) {
+ DankersSkyblockMod.skillStopwatch.resume();
+ } else if (!DankersSkyblockMod.skillStopwatch.isStarted()) {
+ DankersSkyblockMod.skillStopwatch.start();
+ }
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started."));
+ break;
+ case "pause":
+ case "stop":
+ if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) {
+ DankersSkyblockMod.skillStopwatch.suspend();
+ } else {
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker paused."));
+ }
+ break;
+ case "reset":
+ DankersSkyblockMod.skillStopwatch = new StopWatch();
+ DankersSkyblockMod.farmingXPGained = 0;
+ DankersSkyblockMod.miningXPGained = 0;
+ DankersSkyblockMod.combatXPGained = 0;
+ DankersSkyblockMod.foragingXPGained = 0;
+ DankersSkyblockMod.fishingXPGained = 0;
+ DankersSkyblockMod.enchantingXPGained = 0;
+ DankersSkyblockMod.alchemyXPGained = 0;
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker reset."));
+ break;
+ case "hide":
+ DankersSkyblockMod.showSkillTracker = false;
+ ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker hidden."));
+ break;
+ case "show":
+ DankersSkyblockMod.showSkillTracker = true;
+ ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker shown."));
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }).start();
+ }
}
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index 15693ef..0054c10 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -41,6 +41,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean swapToPickBlockToggled;
public static boolean flowerWeaponsToggled;
public static boolean notifySlayerSlainToggled;
+ public static boolean autoSkillTrackerToggled;
// Puzzle Solvers
public static boolean threeManToggled;
public static boolean oruoToggled;
@@ -70,7 +71,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/" +
"aotd/lividdagger/flowerweapons/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" +
"outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" +
- "lividsolver/stopsalvagestarred/notifyslayerslain/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" +
+ "lividsolver/stopsalvagestarred/notifyslayerslain/autoskilltracker/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" +
"watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/" +
"itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>";
}
@@ -88,7 +89,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
"flowerweapons", "sceptremessages", "petcolors", "dungeontimer", "golemalerts",
"expertiselore", "skill50display", "outlinetext", "midasstaffmessages",
"implosionmessages", "healmessages", "caketimer", "lowhealthnotify",
- "lividsolver", "stopsalvagestarred", "notifyslayerslain", "threemanpuzzle", "oruopuzzle", "blazepuzzle",
+ "lividsolver", "stopsalvagestarred", "notifyslayerslain", "autoskilltracker", "threemanpuzzle", "oruopuzzle", "blazepuzzle",
"creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal",
"selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer",
"chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list");
@@ -237,6 +238,11 @@ public class ToggleCommand extends CommandBase implements ICommand {
ConfigHandler.writeBooleanConfig("toggles", "NotifySlayerSlain", notifySlayerSlainToggled);
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Notify when slayer slain has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + notifySlayerSlainToggled + DankersSkyblockMod.MAIN_COLOUR + "."));
break;
+ case "autoskilltracker":
+ autoSkillTrackerToggled = !autoSkillTrackerToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "AutoSkillTracker", autoSkillTrackerToggled);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto start/stop skill tracker has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + autoSkillTrackerToggled + DankersSkyblockMod.MAIN_COLOUR + "."));
+ break;
case "threemanpuzzle":
threeManToggled = !threeManToggled;
ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled);
@@ -346,6 +352,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
DankersSkyblockMod.TYPE_COLOUR + " Outline displayed text: " + DankersSkyblockMod.VALUE_COLOUR + outlineTextToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Cake timer: " + DankersSkyblockMod.VALUE_COLOUR + cakeTimerToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Low health notify: " + DankersSkyblockMod.VALUE_COLOUR + lowHealthNotifyToggled + "\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Auto start/stop skill tracker: " + DankersSkyblockMod.VALUE_COLOUR + autoSkillTrackerToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Livid solver: " + DankersSkyblockMod.VALUE_COLOUR + lividSolverToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Three man puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + threeManToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Oruo trivia solver: " + DankersSkyblockMod.VALUE_COLOUR + oruoToggled + "\n" +