diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-04-08 08:43:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 08:43:19 -0400 |
commit | 14efcd8b81763d1c06a4291eeb6a0f1aaeb770fe (patch) | |
tree | 5b58218f51e6f358e5dd15946580dd7b7159c79a /src/main/java/me/Danker/commands/SkillTrackerCommand.java | |
parent | 435d8dfd5a7f36803ceefcbd245e814ec735aced (diff) | |
parent | 8b1c19bff9ca13034e794ef76086e75aaf59bd14 (diff) | |
download | SkyblockMod-14efcd8b81763d1c06a4291eeb6a0f1aaeb770fe.tar.gz SkyblockMod-14efcd8b81763d1c06a4291eeb6a0f1aaeb770fe.tar.bz2 SkyblockMod-14efcd8b81763d1c06a4291eeb6a0f1aaeb770fe.zip |
Merge pull request #91 from bowser0000/developmentv1.8.6
1.8.6
Diffstat (limited to 'src/main/java/me/Danker/commands/SkillTrackerCommand.java')
-rw-r--r-- | src/main/java/me/Danker/commands/SkillTrackerCommand.java | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/src/main/java/me/Danker/commands/SkillTrackerCommand.java b/src/main/java/me/Danker/commands/SkillTrackerCommand.java index 03753aa..c13e18c 100644 --- a/src/main/java/me/Danker/commands/SkillTrackerCommand.java +++ b/src/main/java/me/Danker/commands/SkillTrackerCommand.java @@ -1,6 +1,7 @@ package me.Danker.commands; import me.Danker.DankersSkyblockMod; +import me.Danker.features.SkillTracker; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -25,6 +26,10 @@ public class SkillTrackerCommand extends CommandBase { return "/" + getCommandName() + " <start/stop/reset>"; } + public static String usage(ICommandSender arg0) { + return new SkillTrackerCommand().getCommandUsage(arg0); + } + @Override public int getRequiredPermissionLevel() { return 0; @@ -55,39 +60,39 @@ public class SkillTrackerCommand extends CommandBase { 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(); + if (SkillTracker.skillStopwatch.isStarted() && SkillTracker.skillStopwatch.isSuspended()) { + SkillTracker.skillStopwatch.resume(); + } else if (!SkillTracker.skillStopwatch.isStarted()) { + SkillTracker.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(); + if (SkillTracker.skillStopwatch.isStarted() && !SkillTracker.skillStopwatch.isSuspended()) { + SkillTracker.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; + SkillTracker.skillStopwatch = new StopWatch(); + SkillTracker.farmingXPGained = 0; + SkillTracker.miningXPGained = 0; + SkillTracker.combatXPGained = 0; + SkillTracker.foragingXPGained = 0; + SkillTracker.fishingXPGained = 0; + SkillTracker.enchantingXPGained = 0; + SkillTracker.alchemyXPGained = 0; player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker reset.")); break; case "hide": - DankersSkyblockMod.showSkillTracker = false; + SkillTracker.showSkillTracker = false; ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker hidden.")); break; case "show": - DankersSkyblockMod.showSkillTracker = true; + SkillTracker.showSkillTracker = true; ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker shown.")); break; |