diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-11-10 23:24:17 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-11-10 23:24:17 -0500 |
commit | 6cf3309708ca632fdeebd99a2a79f3a3471e549d (patch) | |
tree | d741cfe060507dcfb35d02837f0663d521742e45 /src/main/java/me/Danker/commands/MoveCommand.java | |
parent | 511b95de7dcb83e047dce2adadeff8c18804c1b6 (diff) | |
download | SkyblockMod-6cf3309708ca632fdeebd99a2a79f3a3471e549d.tar.gz SkyblockMod-6cf3309708ca632fdeebd99a2a79f3a3471e549d.tar.bz2 SkyblockMod-6cf3309708ca632fdeebd99a2a79f3a3471e549d.zip |
Add display for time until century cakes run out
Diffstat (limited to 'src/main/java/me/Danker/commands/MoveCommand.java')
-rw-r--r-- | src/main/java/me/Danker/commands/MoveCommand.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java index 1a68528..a3f5e3b 100644 --- a/src/main/java/me/Danker/commands/MoveCommand.java +++ b/src/main/java/me/Danker/commands/MoveCommand.java @@ -19,6 +19,7 @@ public class MoveCommand extends CommandBase { public static int[] dungeonTimerXY = {0, 0}; public static int[] skill50XY = {0, 0}; public static int[] lividHpXY = {0, 0}; + public static int[] cakeTimerXY = {0, 0}; @Override public String getCommandName() { @@ -27,7 +28,7 @@ public class MoveCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp> <x> <y>"; + return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer> <x> <y>"; } @Override @@ -38,7 +39,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", "skill50", "lividhp"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer"); } return null; } @@ -83,6 +84,11 @@ public class MoveCommand extends CommandBase { cf.writeIntConfig("locations", "lividHpX", lividHpXY[0]); cf.writeIntConfig("locations", "lividHpY", lividHpXY[1]); player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Livid HP has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + } else if (arg1[0].equalsIgnoreCase("caketimer")) { + cakeTimerXY[0] = Integer.parseInt(arg1[1]); + cakeTimerXY[1] = Integer.parseInt(arg1[2]); + cf.writeIntConfig("locations", "cakeTimerX", cakeTimerXY[0]); + cf.writeIntConfig("locations", "cakeTimerY", cakeTimerXY[1]); } else { player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); } |