Skip to content

Latest commit

 

History

History
264 lines (264 loc) · 11.4 KB

cn.nukkit.utils.TextFormat.md

File metadata and controls

264 lines (264 loc) · 11.4 KB
    • Enum Constant Summary

      Enum Constants 
      Enum Constant and Description
      AQUA
      Represents aqua.
      BLACK
      Represents black.
      BLUE
      Represents blue.
      BOLD
      Makes the text bold.
      DARK_AQUA
      Represents dark blue (aqua).
      DARK_BLUE
      Represents dark blue.
      DARK_GRAY
      Represents dark gray.
      DARK_GREEN
      Represents dark green.
      DARK_PURPLE
      Represents dark purple.
      DARK_RED
      Represents dark red.
      GOLD
      Represents gold.
      GRAY
      Represents gray.
      GREEN
      Represents green.
      ITALIC
      Makes the text italic.
      LIGHT_PURPLE
      Represents light purple.
      MINECOIN_GOLD
      Represents minecoins gold.
      OBFUSCATED
      Makes the text obfuscated.
      RED
      Represents red.
      RESET
      Resets all previous chat colors or formats.
      STRIKETHROUGH
      Makes a line appear through the text.
      UNDERLINE
      Makes the text appear underlined.
      WHITE
      Represents white.
      YELLOW
      Represents yellow.
  • 成员变量一览

    成员变量 
    修饰符和类 成员变量描述
    static char ESCAPE
    The special character which prefixes all format codes.
  • 成员函数一览

    All Methods Static Methods Instance Methods Concrete Methods 
    修饰符和类 成员函数描述
    static String clean(String input)
    Cleans the given message of all format codes.
    static String clean(String input, boolean recursive) 
    static String colorize(char altFormatChar, String textToTranslate)
    Translates a string using an alternate format code character into a string that uses the internal TextFormat.ESCAPE format code character.
    static String colorize(String textToTranslate)
    Translates a string, using an ampersand (&) as an alternate format code character, into a string that uses the internal TextFormat.ESCAPE format code character.
    static TextFormat getByChar(char code)
    Gets the TextFormat represented by the specified format code.
    static TextFormat getByChar(String code)
    Gets the TextFormat represented by the specified format code.
    char getChar()
    Gets the char value associated with this color
    static String getLastColors(String input)
    Gets the chat color used at the end of the given input string.
    boolean isColor()
    Checks if this code is a color code as opposed to a format code.
    boolean isFormat()
    Checks if this code is a format code as opposed to a color code.
    String toString() 
    static TextFormat valueOf(String name)
    Returns the enum constant of this type with the specified name.
    static TextFormat[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    • 继承自类 java.lang.Enum

      clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
    • 继承自类 java.lang.Object

      getClass, notify, notifyAll, wait, wait, wait