Enum Class ChatFormat

java.lang.Object
java.lang.Enum<ChatFormat>
wtf.choco.veinminer.util.ChatFormat
All Implemented Interfaces:
Serializable, Comparable<ChatFormat>, Constable

public enum ChatFormat extends Enum<ChatFormat>
All supported legacy chat colour and format codes.
  • Enum Constant Details

    • BLACK

      public static final ChatFormat BLACK
      Black (&0).
    • DARK_BLUE

      public static final ChatFormat DARK_BLUE
      Dark blue (&1).
    • DARK_GREEN

      public static final ChatFormat DARK_GREEN
      Dark green (&2).
    • DARK_AQUA

      public static final ChatFormat DARK_AQUA
      Dark aqua (&3).
    • DARK_RED

      public static final ChatFormat DARK_RED
      Dark red (&4).
    • DARK_PURPLE

      public static final ChatFormat DARK_PURPLE
      Dark purple (&5).
    • GOLD

      public static final ChatFormat GOLD
      Gold (&6).
    • GRAY

      public static final ChatFormat GRAY
      Gray (&7).
    • DARK_GRAY

      public static final ChatFormat DARK_GRAY
      Dark gray (&8).
    • BLUE

      public static final ChatFormat BLUE
      Blue (&9).
    • GREEN

      public static final ChatFormat GREEN
      Green (&a).
    • AQUA

      public static final ChatFormat AQUA
      Aqua (&b).
    • RED

      public static final ChatFormat RED
      Red (&c).
    • LIGHT_PURPLE

      public static final ChatFormat LIGHT_PURPLE
      Light purple (&d).
    • YELLOW

      public static final ChatFormat YELLOW
      Yellow (&e).
    • WHITE

      public static final ChatFormat WHITE
      White (&f).
    • MAGIC

      public static final ChatFormat MAGIC
      Magic/obfuscated text (&k).
    • BOLD

      public static final ChatFormat BOLD
      Bold text (&l).
    • STRIKETHROUGH

      public static final ChatFormat STRIKETHROUGH
      Strikethrough text (&m).
    • UNDERLINE

      public static final ChatFormat UNDERLINE
      Underline text (&n).
    • ITALIC

      public static final ChatFormat ITALIC
      Italic text (&o).
    • RESET

      public static final ChatFormat RESET
      Reset formatting (&r).
  • Field Details

    • COLOR_CHAR

      public static final char COLOR_CHAR
      The legacy colour character.
      See Also:
  • Method Details

    • values

      public static ChatFormat[] values()
      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 ChatFormat valueOf(String name)
      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
    • toString

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

      public boolean isFormat()
      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()
      Checks if this code is a color code as opposed to a format code.
      Returns:
      whether this ChatColor is a color code
    • translateAlternateColorCodes

      @NotNull public static @NotNull String translateAlternateColorCodes(char altColorChar, @NotNull @NotNull String string)
      Translates a string using an alternate color code character into a string that uses the 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: &
      string - the string the translate
      Returns:
      text containing the color code character