diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-09-05 18:35:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-05 18:35:43 -0400 |
commit | 20b405f59dcd92df1b4c3cd5b9ac353652ef4405 (patch) | |
tree | f387a1ca10387c77381a22568b486984da5b38a6 /src/main/java/me/Danker/commands/MoveCommand.java | |
parent | 3ed5e14d43c6f3ff3cdce7598d01254e9465c33d (diff) | |
parent | a29cfb42db5da544f8445f56acb3742e396d8dee (diff) | |
download | SkyblockMod-20b405f59dcd92df1b4c3cd5b9ac353652ef4405.tar.gz SkyblockMod-20b405f59dcd92df1b4c3cd5b9ac353652ef4405.tar.bz2 SkyblockMod-20b405f59dcd92df1b4c3cd5b9ac353652ef4405.zip |
v1.7v1.7
Merge pull request #13 from bowser0000/development
Diffstat (limited to 'src/main/java/me/Danker/commands/MoveCommand.java')
-rw-r--r-- | src/main/java/me/Danker/commands/MoveCommand.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java index 1232e18..24396ff 100644 --- a/src/main/java/me/Danker/commands/MoveCommand.java +++ b/src/main/java/me/Danker/commands/MoveCommand.java @@ -15,6 +15,7 @@ public class MoveCommand extends CommandBase { public static int[] coordsXY = {0, 0}; public static int[] displayXY = {0, 0}; + public static int[] dungeonTimerXY = {0, 0}; @Override public String getCommandName() { @@ -23,7 +24,7 @@ public class MoveCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return getCommandName() + " <coords/display> <x> <y>"; + return getCommandName() + " <coords/display/dungeontimer> <x> <y>"; } @Override @@ -34,7 +35,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"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer"); } return null; } @@ -45,7 +46,7 @@ public class MoveCommand extends CommandBase { final ConfigHandler cf = new ConfigHandler(); if (arg1.length < 2) { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display> <x> <y>")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display/dungeontimer> <x> <y>")); return; } @@ -61,8 +62,14 @@ public class MoveCommand extends CommandBase { cf.writeIntConfig("locations", "displayX", displayXY[0]); cf.writeIntConfig("locations", "displayY", displayXY[1]); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Tracker display has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2])); + } else if (arg1[0].equalsIgnoreCase("dungeontimer")) { + dungeonTimerXY[0] = Integer.parseInt(arg1[1]); + dungeonTimerXY[1] = Integer.parseInt(arg1[2]); + cf.writeIntConfig("locations", "dungeonTimerX", dungeonTimerXY[0]); + cf.writeIntConfig("locations", "dungeonTimerY", dungeonTimerXY[1]); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Dungeon timer has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2])); } else { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display> <x> <y>")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display/dungeontimer> <x> <y>")); } } |