From c33d70d29a8976079be54507ea8c53cec1a01a49 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Fri, 4 Sep 2020 19:37:28 -0400 Subject: Add dungeon timer, fix dungeon coins and time tracker --- src/main/java/me/Danker/commands/ScaleCommand.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/main/java/me/Danker/commands/ScaleCommand.java') diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java index f8c73c9..03c0793 100644 --- a/src/main/java/me/Danker/commands/ScaleCommand.java +++ b/src/main/java/me/Danker/commands/ScaleCommand.java @@ -15,6 +15,7 @@ public class ScaleCommand extends CommandBase { public static double coordsScale; public static double displayScale; + public static double dungeonTimerScale; @Override public String getCommandName() { @@ -23,7 +24,7 @@ public class ScaleCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return getCommandName() + " "; + return getCommandName() + " "; } @Override @@ -34,7 +35,7 @@ public class ScaleCommand extends CommandBase { @Override public List addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "coords", "display"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer"); } return null; } @@ -44,7 +45,7 @@ public class ScaleCommand extends CommandBase { final EntityPlayer player = (EntityPlayer) arg0; if (arg1.length < 2) { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /scale ")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /scale ")); return; } @@ -62,8 +63,12 @@ public class ScaleCommand extends CommandBase { displayScale = scaleAmount; ConfigHandler.writeDoubleConfig("scales", "displayScale", displayScale); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Display has been scaled to " + EnumChatFormatting.DARK_GREEN + displayScale + "x")); + } else if (arg1[0].equalsIgnoreCase("dungeontimer")) { + dungeonTimerScale = scaleAmount; + ConfigHandler.writeDoubleConfig("scales", "dungeonTimerScale", dungeonTimerScale); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Dungeon timer has been scaled to " + EnumChatFormatting.DARK_GREEN + dungeonTimerScale + "x")); } else { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /scale ")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /scale ")); } } -- cgit