From 032cbaea86a08b98a239257f464a00a925068fda Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Sun, 28 Mar 2021 19:22:35 -0400 Subject: Add 20s countdown to golem alert --- src/main/java/me/Danker/commands/MoveCommand.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/Danker/commands/MoveCommand.java') diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java index 6dedbaf..6fe2939 100644 --- a/src/main/java/me/Danker/commands/MoveCommand.java +++ b/src/main/java/me/Danker/commands/MoveCommand.java @@ -22,6 +22,7 @@ public class MoveCommand extends CommandBase { public static int[] skillTrackerXY = {0, 0}; public static int[] waterAnswerXY = {0, 0}; public static int[] bonzoTimerXY = {0, 0}; + public static int[] golemTimerXY = {0 ,0}; @Override public String getCommandName() { @@ -30,7 +31,7 @@ public class MoveCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " "; + return "/" + getCommandName() + " "; } public static String usage(ICommandSender arg0) { @@ -45,7 +46,7 @@ public class MoveCommand extends CommandBase { @Override public List addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer", "bonzotimer"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer", "bonzotimer", "golemtimer"); } return null; } @@ -123,6 +124,13 @@ public class MoveCommand extends CommandBase { ConfigHandler.writeIntConfig("locations", "bonzoTimerX", bonzoTimerXY[1]); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Bonzo's Mask timer has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); break; + case "golemtimer": + golemTimerXY[0] = Integer.parseInt(arg1[1]); + golemTimerXY[1] = Integer.parseInt(arg1[2]); + ConfigHandler.writeIntConfig("locations", "golemTimerX", golemTimerXY[0]); + ConfigHandler.writeIntConfig("locations", "golemTimerY", golemTimerXY[1]); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Golem timer has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + break; default: player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); } -- cgit