diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-10-05 18:19:52 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-10-05 18:19:52 -0400 |
commit | 0379a3c43be18b22d77056eb5b26b4f239d9988e (patch) | |
tree | 6dbb1efbace7a4ab5ab85f7aee98b09c70cc4a84 /src/main/java/me/Danker/commands | |
parent | 2a1c6ec74089d247e63e80682b48e1777b9dd388 (diff) | |
download | SkyblockMod-0379a3c43be18b22d77056eb5b26b4f239d9988e.tar.gz SkyblockMod-0379a3c43be18b22d77056eb5b26b4f239d9988e.tar.bz2 SkyblockMod-0379a3c43be18b22d77056eb5b26b4f239d9988e.zip |
Add auto slayer tracker display
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r-- | src/main/java/me/Danker/commands/DHelpCommand.java | 2 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/DisplayCommand.java | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index d9e6d21..65cff49 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -37,7 +37,7 @@ public class DHelpCommand extends CommandBase { 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-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/off> [winter/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays 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/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" + diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java index 271b172..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/festival/session/f(1-6)]"; + return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/auto/off> [winter/festival/session/f(1-6)]"; } @Override @@ -32,7 +33,7 @@ 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", "festival", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { @@ -140,13 +141,20 @@ public class DisplayCommand extends CommandBase { 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: " + 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); } |