From 050a1b2d8fbea8567de76d6515908470054d81c1 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Thu, 24 Sep 2020 23:14:56 -0400 Subject: Add option for displaying total skill xp instead of progress to next level --- src/main/java/me/Danker/commands/MoveCommand.java | 11 +++++++++-- 1 file changed, 9 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 bbc62b8..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() + " "; + return "/" + getCommandName() + " "; } @Override @@ -35,7 +36,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"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50"); } return null; } @@ -68,6 +69,12 @@ 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: " + getCommandUsage(arg0))); } -- cgit