diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-07-13 17:42:57 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-07-13 17:42:57 -0400 |
commit | 8ce07f5b4b4c7d8cef95dd613885e5219ce6a6a2 (patch) | |
tree | 4ae7cd5ff26139a3fb0f390cbe359fa210337f7b /me/Danker/commands/ToggleCommand.java | |
parent | ec0334bfb60226e5bd0fb987babbe16384bd5ae0 (diff) | |
download | SkyblockMod-8ce07f5b4b4c7d8cef95dd613885e5219ce6a6a2.tar.gz SkyblockMod-8ce07f5b4b4c7d8cef95dd613885e5219ce6a6a2.tar.bz2 SkyblockMod-8ce07f5b4b4c7d8cef95dd613885e5219ce6a6a2.zip |
/move command, colours and slayer fixv1.4.1
Added /move command to move text displays. Add colour to messages and error messages in chat. Fixed slayer drops not being tracked.
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]")); } } } |