Package org.bukkit

Enum Class ChatColor

All Implemented Interfaces:
Serializable, Comparable<ChatColor>, Constable

@Deprecated public enum ChatColor extends Enum<ChatColor>
Deprecated.
ChatColor has been deprecated in favor of Adventure API. See NamedTextColor for the adventure equivalent of pre-defined text colors
All supported color values for chat
  • Enum Constant Details

    • BLACK

      public static final ChatColor BLACK
      Deprecated.
      Represents black
    • DARK_BLUE

      public static final ChatColor DARK_BLUE
      Deprecated.
      Represents dark blue
    • DARK_GREEN

      public static final ChatColor DARK_GREEN
      Deprecated.
      Represents dark green
    • DARK_AQUA

      public static final ChatColor DARK_AQUA
      Deprecated.
      Represents dark blue (aqua)
    • DARK_RED

      public static final ChatColor DARK_RED
      Deprecated.
      Represents dark red
    • DARK_PURPLE

      public static final ChatColor DARK_PURPLE
      Deprecated.
      Represents dark purple
    • GOLD

      public static final ChatColor GOLD
      Deprecated.
      Represents gold
    • GRAY

      public static final ChatColor GRAY
      Deprecated.
      Represents gray
    • DARK_GRAY

      public static final ChatColor DARK_GRAY
      Deprecated.
      Represents dark gray
    • BLUE

      public static final ChatColor BLUE
      Deprecated.
      Represents blue
    • GREEN

      public static final ChatColor GREEN
      Deprecated.
      Represents green
    • AQUA

      public static final ChatColor AQUA
      Deprecated.
      Represents aqua
    • RED

      public static final ChatColor RED
      Deprecated.
      Represents red
    • LIGHT_PURPLE

      public static final ChatColor LIGHT_PURPLE
      Deprecated.
      Represents light purple
    • YELLOW

      public static final ChatColor YELLOW
      Deprecated.
      Represents yellow
    • WHITE

      public static final ChatColor WHITE
      Deprecated.
      Represents white
    • MAGIC

      public static final ChatColor MAGIC
      Deprecated.
      Represents magical characters that change around randomly
    • BOLD

      public static final ChatColor BOLD
      Deprecated.
      Makes the text bold.
    • STRIKETHROUGH

      public static final ChatColor STRIKETHROUGH
      Deprecated.
      Makes a line appear through the text.
    • UNDERLINE

      public static final ChatColor UNDERLINE
      Deprecated.
      Makes the text appear underlined.
    • ITALIC

      public static final ChatColor ITALIC
      Deprecated.
      Makes the text italic.
    • RESET

      public static final ChatColor RESET
      Deprecated.
      Resets all previous chat colors or formats.
  • Field Details

    • COLOR_CHAR

      public static final char COLOR_CHAR
      Deprecated.
      The special character which prefixes all chat colour codes. Use this if you need to dynamically convert colour codes from your custom format.
      See Also:
    • HEX_PATTERN

      @Deprecated public static final Pattern HEX_PATTERN
      Deprecated.
  • Method Details

    • values

      public static ChatColor[] values()
      Deprecated.
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ChatColor valueOf(String name)
      Deprecated.
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • asBungee

      @NotNull public net.md_5.bungee.api.ChatColor asBungee()
      Deprecated.
    • getChar

      public char getChar()
      Deprecated.
      Gets the char value associated with this color
      Returns:
      A char value of this color code
    • toString

      @NotNull public @NotNull String toString()
      Deprecated.
      Overrides:
      toString in class Enum<ChatColor>
    • isFormat

      public boolean isFormat()
      Deprecated.
      Checks if this code is a format code as opposed to a color code.
      Returns:
      whether this ChatColor is a format code
    • isColor

      public boolean isColor()
      Deprecated.
      Checks if this code is a color code as opposed to a format code.
      Returns:
      whether this ChatColor is a color code
    • getByChar

      @Nullable public static @Nullable ChatColor getByChar(char code)
      Deprecated.
      Gets the color represented by the specified color code
      Parameters:
      code - Code to check
      Returns:
      Associative ChatColor with the given code, or null if it doesn't exist
    • getByChar

      @Nullable public static @Nullable ChatColor getByChar(@NotNull @NotNull String code)
      Deprecated.
      Gets the color represented by the specified color code
      Parameters:
      code - Code to check
      Returns:
      Associative ChatColor with the given code, or null if it doesn't exist
    • stripColor

      @Contract("!null -> !null; null -> null") @Nullable public static @Nullable String stripColor(@Nullable @Nullable String input)
      Deprecated.
      Strips the given message of all color codes
      Parameters:
      input - String to strip of color
      Returns:
      A copy of the input string, without any coloring
    • translateAlternateColorCodes

      @NotNull public static @NotNull String translateAlternateColorCodes(char altColorChar, @NotNull @NotNull String textToTranslate)
      Deprecated.
      Translates a string using an alternate color code character into a string that uses the internal ChatColor.COLOR_CODE color code character. The alternate color code character will only be replaced if it is immediately followed by 0-9, A-F, a-f, K-O, k-o, R or r.
      Parameters:
      altColorChar - The alternate color code character to replace. Ex: &
      textToTranslate - Text containing the alternate color code character.
      Returns:
      Text containing the ChatColor.COLOR_CODE color code character.
    • getLastColors

      @NotNull public static @NotNull String getLastColors(@NotNull @NotNull String input)
      Deprecated.
      Gets the ChatColors used at the end of the given input string.
      Parameters:
      input - Input string to retrieve the colors from.
      Returns:
      Any remaining ChatColors to pass onto the next line.
    • toMM

      @NotNull public static @NotNull String toMM(@NotNull @NotNull String str)
      Deprecated.
      Convert legacy string into a string ready to be parsed by MiniMessage
      Parameters:
      str - Legacy string
      Returns:
      MiniMessage ready string
    • parseMM

      @NotNull public static Component parseMM(@NotNull @NotNull String string, @Nullable @Nullable Object... args)
      Deprecated.
    • replaceHex

      Deprecated.
    • color

      Deprecated.
    • color

      @Deprecated @Nullable public static @Nullable String color(@Nullable @Nullable String str, boolean parseHex)
      Deprecated.