diff options
Diffstat (limited to 'me/Danker/commands/ToggleCommand.java')
-rw-r--r-- | me/Danker/commands/ToggleCommand.java | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/me/Danker/commands/ToggleCommand.java b/me/Danker/commands/ToggleCommand.java index 7e1b83a..bbcafc1 100644 --- a/me/Danker/commands/ToggleCommand.java +++ b/me/Danker/commands/ToggleCommand.java @@ -7,19 +7,11 @@ import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; public class ToggleCommand extends CommandBase implements ICommand { public static boolean gpartyToggled; public static boolean coordsToggled; - - public boolean getToggle(String type) { - if (type.equals("gparty")) { - return gpartyToggled; - } else if (type.equals("coords")) { - return coordsToggled; - } - return true; - } @Override public String getCommandName() { @@ -42,23 +34,23 @@ public class ToggleCommand extends CommandBase implements ICommand { final ConfigHandler cf = new ConfigHandler(); if (arg1.length == 0) { - player.addChatMessage(new ChatComponentText("Usage: /toggle [gparty/coords/list]")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle [gparty/coords/list]")); return; } if (arg1[0].equalsIgnoreCase("gparty")) { gpartyToggled = !gpartyToggled; cf.writeBooleanConfig("toggles", "GParty", gpartyToggled); - player.addChatMessage(new ChatComponentText("Guild party notifications has been set to " + gpartyToggled + ".")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Guild party notifications has been set to " + EnumChatFormatting.DARK_GREEN + gpartyToggled + EnumChatFormatting.GREEN + ".")); } else if (arg1[0].equalsIgnoreCase("coords")) { coordsToggled = !coordsToggled; cf.writeBooleanConfig("toggles", "Coords", coordsToggled); - player.addChatMessage(new ChatComponentText("Coord/Angle display has been set to " + coordsToggled + ".")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Coord/Angle display has been set to " + EnumChatFormatting.DARK_GREEN + coordsToggled + EnumChatFormatting.GREEN + ".")); } else if (arg1[0].equalsIgnoreCase("list")) { - player.addChatMessage(new ChatComponentText("Guild party notifications: " + gpartyToggled)); - player.addChatMessage(new ChatComponentText("Coord/Angle display: " + coordsToggled)); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Guild party notifications: " + EnumChatFormatting.DARK_GREEN + gpartyToggled + "\n" + + EnumChatFormatting.GREEN + " Coord/Angle display: " + EnumChatFormatting.DARK_GREEN + coordsToggled)); } else { - player.addChatMessage(new ChatComponentText("Usage: /toggle [gparty/coords/list]")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle [gparty/coords/list]")); } } } |