net.minecraft.util

## Class ChatMessageComponent

- java.lang.Object
- - net.minecraft.util.ChatMessageComponent

-     public class ChatMessageComponent
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChatMessageComponent()`
    `ChatMessageComponent(ChatMessageComponent par1ChatMessageComponent)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ChatMessageComponent` | `addFormatted(String par1Str, Object... par2ArrayOfObj)` Appends a formatted translation key.
    `ChatMessageComponent` | `addKey(String par1Str)` Appends a translated string.
    `ChatMessageComponent` | `addText(String par1Str)`
    `ChatMessageComponent` | `appendComponent(ChatMessageComponent par1ChatMessageComponent)`
    `static ChatMessageComponent` | `createFromJson(String par0Str)`
    `static ChatMessageComponent` | `createFromText(String par0Str)`
    `static ChatMessageComponent` | `createFromTranslationKey(String par0Str)`
    `static ChatMessageComponent` | `createFromTranslationWithSubstitutions(String par0Str, Object... par1ArrayOfObj)`
    `EnumChatFormatting` | `getColor()`
    `Boolean` | `isBold()`
    `Boolean` | `isItalic()`
    `Boolean` | `isObfuscated()`
    `Boolean` | `isUnderline()`
    `ChatMessageComponent` | `setBold(Boolean par1)`
    `ChatMessageComponent` | `setColor(EnumChatFormatting par1EnumChatFormatting)`
    `ChatMessageComponent` | `setItalic(Boolean par1)`
    `ChatMessageComponent` | `setObfuscated(Boolean par1)`
    `ChatMessageComponent` | `setUnderline(Boolean par1)`
    `String` | `toJson()`
    `String` | `toString()`
    `String` | `toStringWithDefaultFormatting(boolean par1, EnumChatFormatting par2EnumChatFormatting, boolean par3, boolean par4, boolean par5, boolean par6)` args: enableFormat, defaultColor, defaultBold, defaultItalic, defaultUnderline, defaultObfuscated
    `String` | `toStringWithFormatting(boolean par1)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ChatMessageComponent

          public ChatMessageComponent()

    - #### ChatMessageComponent

          public ChatMessageComponent(ChatMessageComponent par1ChatMessageComponent)

  - ### Method Detail

    - #### setColor

          public ChatMessageComponent setColor(EnumChatFormatting par1EnumChatFormatting)

    - #### getColor

          public EnumChatFormatting getColor()

    - #### setBold

          public ChatMessageComponent setBold(Boolean par1)

    - #### isBold

          public Boolean isBold()

    - #### setItalic

          public ChatMessageComponent setItalic(Boolean par1)

    - #### isItalic

          public Boolean isItalic()

    - #### setUnderline

          public ChatMessageComponent setUnderline(Boolean par1)

    - #### isUnderline

          public Boolean isUnderline()

    - #### setObfuscated

          public ChatMessageComponent setObfuscated(Boolean par1)

    - #### isObfuscated

          public Boolean isObfuscated()

    - #### appendComponent

          public ChatMessageComponent appendComponent(ChatMessageComponent par1ChatMessageComponent)

    - #### addText

          public ChatMessageComponent addText(String par1Str)

    - #### addKey

          public ChatMessageComponent addKey(String par1Str)

      Appends a translated string.

    - #### addFormatted

          public ChatMessageComponent addFormatted(String par1Str,
                                          Object... par2ArrayOfObj)

      Appends a formatted translation key. Args: key, params. The text ultimately displayed is String.format(translate(key), params)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toStringWithFormatting

          public String toStringWithFormatting(boolean par1)

    - #### toStringWithDefaultFormatting

          public String toStringWithDefaultFormatting(boolean par1,
                                             EnumChatFormatting par2EnumChatFormatting,
                                             boolean par3,
                                             boolean par4,
                                             boolean par5,
                                             boolean par6)

      args: enableFormat, defaultColor, defaultBold, defaultItalic, defaultUnderline, defaultObfuscated

    - #### createFromJson

          public static ChatMessageComponent createFromJson(String par0Str)

    - #### createFromText

          public static ChatMessageComponent createFromText(String par0Str)

    - #### createFromTranslationKey

          public static ChatMessageComponent createFromTranslationKey(String par0Str)

    - #### createFromTranslationWithSubstitutions

          public static ChatMessageComponent createFromTranslationWithSubstitutions(String par0Str,
                                                                    Object... par1ArrayOfObj)

    - #### toJson

          public String toJson()