Enum TextFormatting

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TextFormatting>

    public enum TextFormatting
    extends java.lang.Enum<TextFormatting>
    • Field Detail

      • FORMATTING_BY_NAME

        private static final java.util.Map<java.lang.String,​TextFormatting> FORMATTING_BY_NAME
      • STRIP_FORMATTING_PATTERN

        private static final java.util.regex.Pattern STRIP_FORMATTING_PATTERN
      • name

        private final java.lang.String name
      • code

        private final char code
      • isFormat

        private final boolean isFormat
      • toString

        private final java.lang.String toString
      • id

        private final int id
      • color

        @Nullable
        private final java.lang.Integer color
    • Constructor Detail

      • TextFormatting

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

        private TextFormatting​(java.lang.String p_i46292_3_,
                               char p_i46292_4_,
                               boolean p_i46292_5_)
      • TextFormatting

        private TextFormatting​(java.lang.String p_i49746_3_,
                               char p_i49746_4_,
                               boolean p_i49746_5_,
                               int p_i49746_6_,
                               @Nullable
                               java.lang.Integer p_i49746_7_)
    • Method Detail

      • values

        public static TextFormatting[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TextFormatting c : TextFormatting.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TextFormatting valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • cleanName

        private static java.lang.String cleanName​(java.lang.String p_175745_0_)
      • getId

        public int getId()
      • isFormat

        public boolean isFormat()
      • isColor

        public boolean isColor()
      • getColor

        @Nullable
        public java.lang.Integer getColor()
      • getName

        public java.lang.String getName()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<TextFormatting>
      • stripFormatting

        @Nullable
        public static java.lang.String stripFormatting​(@Nullable
                                                       java.lang.String p_110646_0_)
      • getByName

        @Nullable
        public static TextFormatting getByName​(@Nullable
                                               java.lang.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 java.util.Collection<java.lang.String> getNames​(boolean p_96296_0_,
                                                                      boolean p_96296_1_)