Enum Class TextFormatting

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

public enum TextFormatting extends Enum<TextFormatting>
  • Enum Constant Details

  • Field Details


      private static final Map<String,TextFormatting> FORMATTING_BY_NAME

      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
  • Constructor Details

    • TextFormatting

      private TextFormatting(String p_i49745_3_, char p_i49745_4_, int p_i49745_5_, @Nullable Integer p_i49745_6_)
    • TextFormatting

      private TextFormatting(String p_i46292_3_, char p_i46292_4_, boolean p_i46292_5_)
    • TextFormatting

      private TextFormatting(String p_i49746_3_, char p_i49746_4_, boolean p_i49746_5_, int p_i49746_6_, @Nullable Integer p_i49746_7_)
  • Method Details

    • values

      public static TextFormatting[] 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 TextFormatting 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 - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • cleanName

      private static String cleanName(String p_175745_0_)
    • 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 in class Enum<TextFormatting>
    • stripFormatting

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

      @Nullable public static TextFormatting getByName(@Nullable String p_96300_0_)
    • getById

      @Nullable public static TextFormatting getById(int p_175744_0_)
    • getByCode

      @Nullable public static TextFormatting getByCode(char p_211165_0_)
    • getNames

      public static Collection<String> getNames(boolean p_96296_0_, boolean p_96296_1_)