diff options
Diffstat (limited to 'me/Danker/commands/ToggleCommand.java')
-rw-r--r-- | me/Danker/commands/ToggleCommand.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/me/Danker/commands/ToggleCommand.java b/me/Danker/commands/ToggleCommand.java index 218378f..793dc40 100644 --- a/me/Danker/commands/ToggleCommand.java +++ b/me/Danker/commands/ToggleCommand.java @@ -16,7 +16,8 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean gpartyToggled; public static boolean coordsToggled; public static boolean goldenToggled; - + public static boolean slayerCountTotal; + @Override public String getCommandName() { return "toggle"; @@ -24,7 +25,7 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public String getCommandUsage(ICommandSender arg0) { - return getCommandName() + " <gparty/coords/golden/list>"; + return getCommandName() + " <gparty/coords/golden/slayercount/list>"; } @Override @@ -35,7 +36,7 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "list"); + return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "list"); } return null; } @@ -46,7 +47,7 @@ public class ToggleCommand extends CommandBase implements ICommand { final ConfigHandler cf = new ConfigHandler(); if (arg1.length == 0) { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/list>")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/list>")); return; } @@ -62,12 +63,16 @@ public class ToggleCommand extends CommandBase implements ICommand { goldenToggled = !goldenToggled; cf.writeBooleanConfig("toggles", "Golden", goldenToggled); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Golden T6 enchants has been set to " + EnumChatFormatting.DARK_GREEN + goldenToggled + EnumChatFormatting.GREEN + ".")); + } else if (arg1[0].equalsIgnoreCase("slayercount")) { + slayerCountTotal = !slayerCountTotal; + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Counting total 20% slayer drops has been set to " + EnumChatFormatting.DARK_GREEN + slayerCountTotal + EnumChatFormatting.GREEN + ".")); } else if (arg1[0].equalsIgnoreCase("list")) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Guild party notifications: " + EnumChatFormatting.DARK_GREEN + gpartyToggled + "\n" + EnumChatFormatting.GREEN + " Coord/Angle display: " + EnumChatFormatting.DARK_GREEN + coordsToggled + "\n" + - EnumChatFormatting.GREEN + " Golden T6 enchants: " + EnumChatFormatting.DARK_GREEN + goldenToggled)); + EnumChatFormatting.GREEN + " Golden T6 enchants: " + EnumChatFormatting.DARK_GREEN + goldenToggled + "\n" + + EnumChatFormatting.GREEN + " Counting total 20% slayer drops: " + EnumChatFormatting.DARK_GREEN + slayerCountTotal)); } else { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/list>")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/list>")); } } } |