程序包 net.minecraft

Enum Class ChatFormatting

java.lang.Object
java.lang.Enum<ChatFormatting>
net.minecraft.ChatFormatting
所有已实现的接口:
Serializable, Comparable<ChatFormatting>, Constable, StringRepresentable

public enum ChatFormatting extends Enum<ChatFormatting> implements StringRepresentable
  • 枚举常量详细资料

  • 字段详细资料

    • CODEC

      public static final com.mojang.serialization.Codec<ChatFormatting> CODEC
    • PREFIX_CODE

      public static final char PREFIX_CODE
      另请参阅:
    • FORMATTING_BY_NAME

      private static final Map<String,ChatFormatting> FORMATTING_BY_NAME
    • STRIP_FORMATTING_PATTERN

      private static final Pattern STRIP_FORMATTING_PATTERN
    • name

      private final String name
    • code

      private final char code
    • isFormat

      private final boolean isFormat
    • toString

      private final String toString
    • id

      private final int id
    • color

      @Nullable private final Integer color
  • 构造器详细资料

    • ChatFormatting

      private ChatFormatting(String pName, char pCode, int pId, @Nullable Integer pColor)
    • ChatFormatting

      private ChatFormatting(String pName, char pCode, boolean pIsFormat)
    • ChatFormatting

      private ChatFormatting(String pName, char pCode, boolean pIsFormat, int pId, @Nullable Integer pColor)
  • 方法详细资料

    • values

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

      public static ChatFormatting 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.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值
    • cleanName

      private static String cleanName(String pString)
    • getChar

      public char getChar()
    • getId

      public int getId()
    • isFormat

      public boolean isFormat()
    • isColor

      public boolean isColor()
    • getColor

      @Nullable public Integer getColor()
    • getName

      public String getName()
    • toString

      public String toString()
      覆盖:
      toString 在类中 Enum<ChatFormatting>
    • stripFormatting

      @Nullable public static String stripFormatting(@Nullable String pText)
    • getByName

      @Nullable public static ChatFormatting getByName(@Nullable String pFriendlyName)
    • getById

      @Nullable public static ChatFormatting getById(int pIndex)
    • getByCode

      @Nullable public static ChatFormatting getByCode(char pFormattingCode)
    • getNames

      public static Collection<String> getNames(boolean pGetColor, boolean pGetFancyStyling)
    • getSerializedName

      public String getSerializedName()
      指定者:
      getSerializedName 在接口中 StringRepresentable