Class ChatStyle


  • public class ChatStyle
    extends java.lang.Object
    + This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ChatStyle.Serializer  
    • Constructor Summary

      Constructors 
      Constructor Description
      ChatStyle()  
    • Constructor Detail

      • ChatStyle

        public ChatStyle()
    • Method Detail

      • getColor

        public EnumChatFormatting getColor()
        + Gets the effective color of this ChatStyle.
      • getBold

        public boolean getBold()
        + Whether or not text of this ChatStyle should be in bold.
      • getItalic

        public boolean getItalic()
        + Whether or not text of this ChatStyle should be italicized.
      • getStrikethrough

        public boolean getStrikethrough()
        + Whether or not to format text of this ChatStyle using strikethrough.
      • getUnderlined

        public boolean getUnderlined()
        + Whether or not text of this ChatStyle should be underlined.
      • getObfuscated

        public boolean getObfuscated()
        + Whether or not text of this ChatStyle should be obfuscated.
      • isEmpty

        public boolean isEmpty()
        + Whether or not this style is empty (inherits everything from the parent).
      • getChatClickEvent

        public ClickEvent getChatClickEvent()
        + The effective chat click event.
      • getChatHoverEvent

        public HoverEvent getChatHoverEvent()
        + The effective chat hover event.
      • getInsertion

        public java.lang.String getInsertion()
        + Get the text to be inserted into Chat when the component is shift-clicked
      • setColor

        public ChatStyle setColor​(EnumChatFormatting enumchatformatting)
        + Sets the color for this ChatStyle to the given value. Only use color values for this; set other values using the specific methods.
      • setBold

        public ChatStyle setBold​(java.lang.Boolean obool)
        + Sets whether or not text of this ChatStyle should be in bold. Set to false if, e.g., the parent style is bold and you want text of this style to be unbolded.
      • setItalic

        public ChatStyle setItalic​(java.lang.Boolean obool)
        + Sets whether or not text of this ChatStyle should be italicized. Set to false if, e.g., the parent style is italicized and you want to override that for this style.
      • setStrikethrough

        public ChatStyle setStrikethrough​(java.lang.Boolean obool)
        + Sets whether or not to format text of this ChatStyle using strikethrough. Set to false if, e.g., the parent style uses strikethrough and you want to override that for this style.
      • setUnderlined

        public ChatStyle setUnderlined​(java.lang.Boolean obool)
        + Sets whether or not text of this ChatStyle should be underlined. Set to false if, e.g., the parent style is underlined and you want to override that for this style.
      • setObfuscated

        public ChatStyle setObfuscated​(java.lang.Boolean obool)
        + Sets whether or not text of this ChatStyle should be obfuscated. Set to false if, e.g., the parent style is obfuscated and you want to override that for this style.
      • setChatClickEvent

        public ChatStyle setChatClickEvent​(ClickEvent clickevent)
        + Sets the event that should be run when text of this ChatStyle is clicked on.
      • setChatHoverEvent

        public ChatStyle setChatHoverEvent​(HoverEvent hoverevent)
        + Sets the event that should be run when text of this ChatStyle is hovered over.
      • setInsertion

        public ChatStyle setInsertion​(java.lang.String insertion)
        + Set a text to be inserted into Chat when the component is shift-clicked
      • setParentStyle

        public ChatStyle setParentStyle​(ChatStyle chatstyle)
        + Sets the fallback ChatStyle to use if this ChatStyle does not override some value. Without a parent, obvious defaults are used (bold: false, underlined: false, etc).
      • getFormattingCode

        public java.lang.String getFormattingCode()
        + Gets the equivalent text formatting code for this style, without the initial section sign (U+00A7) character.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • createShallowCopy

        public ChatStyle createShallowCopy()
        + Creates a shallow copy of this style. Changes to this instance's values will not be reflected in the copy, but changes to the parent style's values WILL be reflected in both this instance and the copy, wherever either does not override a value.
      • createDeepCopy

        public ChatStyle createDeepCopy()
        + Creates a deep copy of this style. No changes to this instance or its parent style will be reflected in the copy.