diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-10-20 11:57:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 11:57:50 -0400 |
commit | 5c5ffdbd4379d4c5002cd42c297f90e631566006 (patch) | |
tree | 1f203e2c7506697efe5efc326d95567bd7e958a0 /src/main/java/me/Danker/commands/MoveCommand.java | |
parent | 20b405f59dcd92df1b4c3cd5b9ac353652ef4405 (diff) | |
parent | 1635fe604e6ca2d32d96409165fcc298f1c5b067 (diff) | |
download | SkyblockMod-5c5ffdbd4379d4c5002cd42c297f90e631566006.tar.gz SkyblockMod-5c5ffdbd4379d4c5002cd42c297f90e631566006.tar.bz2 SkyblockMod-5c5ffdbd4379d4c5002cd42c297f90e631566006.zip |
1.8v1.8
Merge pull request #22 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 24396ff..7fb9acd 100644 --- a/src/main/java/me/Danker/commands/MoveCommand.java +++ b/src/main/java/me/Danker/commands/MoveCommand.java @@ -16,6 +16,7 @@ public class MoveCommand extends CommandBase { public static int[] coordsXY = {0, 0}; public static int[] displayXY = {0, 0}; public static int[] dungeonTimerXY = {0, 0}; + public static int[] skill50XY = {0, 0}; @Override public String getCommandName() { @@ -24,7 +25,7 @@ public class MoveCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return getCommandName() + " <coords/display/dungeontimer> <x> <y>"; + return "/" + getCommandName() + " <coords/display/dungeontimer/skill50> <x> <y>"; } @Override @@ -35,7 +36,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"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50"); } return null; } @@ -46,7 +47,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/dungeontimer> <x> <y>")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0))); return; } @@ -68,8 +69,14 @@ public class MoveCommand extends CommandBase { 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 if (arg1[0].equalsIgnoreCase("skill50")) { + skill50XY[0] = Integer.parseInt(arg1[1]); + skill50XY[1] = Integer.parseInt(arg1[2]); + cf.writeIntConfig("locations", "skill50X", skill50XY[0]); + cf.writeIntConfig("locations", "skill50Y", skill50XY[1]); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Skill 50 display has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2])); } else { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /move <coords/display/dungeontimer> <x> <y>")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0))); } } |