public class ChatStyle
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ChatStyle.Serializer |
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
bold |
private ClickEvent |
chatClickEvent |
private HoverEvent |
chatHoverEvent |
private EnumChatFormatting |
color |
private java.lang.String |
insertion |
private java.lang.Boolean |
italic |
private java.lang.Boolean |
obfuscated |
private ChatStyle |
parentStyle
The parent of this ChatStyle.
|
private static ChatStyle |
rootStyle
The base of the ChatStyle hierarchy.
|
private java.lang.Boolean |
strikethrough |
private java.lang.Boolean |
underlined |
Constructor and Description |
---|
ChatStyle() |
Modifier and Type | Method and Description |
---|---|
ChatStyle |
createDeepCopy()
Creates a deep copy of this style.
|
ChatStyle |
createShallowCopy()
Creates a shallow copy of this style.
|
boolean |
equals(java.lang.Object p_equals_1_) |
boolean |
getBold()
Whether or not text of this ChatStyle should be in bold.
|
ClickEvent |
getChatClickEvent()
The effective chat click event.
|
HoverEvent |
getChatHoverEvent()
The effective chat hover event.
|
EnumChatFormatting |
getColor()
Gets the effective color of this ChatStyle.
|
java.lang.String |
getFormattingCode()
Gets the equivalent text formatting code for this style, without the initial section sign (U+00A7) character.
|
java.lang.String |
getInsertion()
Get the text to be inserted into Chat when the component is shift-clicked
|
boolean |
getItalic()
Whether or not text of this ChatStyle should be italicized.
|
boolean |
getObfuscated()
Whether or not text of this ChatStyle should be obfuscated.
|
private ChatStyle |
getParent()
Gets the immediate parent of this ChatStyle.
|
boolean |
getStrikethrough()
Whether or not to format text of this ChatStyle using strikethrough.
|
boolean |
getUnderlined()
Whether or not text of this ChatStyle should be underlined.
|
int |
hashCode() |
boolean |
isEmpty()
Whether or not this style is empty (inherits everything from the parent).
|
ChatStyle |
setBold(java.lang.Boolean boldIn)
Sets whether or not text of this ChatStyle should be in bold.
|
ChatStyle |
setChatClickEvent(ClickEvent event)
Sets the event that should be run when text of this ChatStyle is clicked on.
|
ChatStyle |
setChatHoverEvent(HoverEvent event)
Sets the event that should be run when text of this ChatStyle is hovered over.
|
ChatStyle |
setColor(EnumChatFormatting color)
Sets the color for this ChatStyle to the given value.
|
ChatStyle |
setInsertion(java.lang.String insertion)
Set a text to be inserted into Chat when the component is shift-clicked
|
ChatStyle |
setItalic(java.lang.Boolean italic)
Sets whether or not text of this ChatStyle should be italicized.
|
ChatStyle |
setObfuscated(java.lang.Boolean obfuscated)
Sets whether or not text of this ChatStyle should be obfuscated.
|
ChatStyle |
setParentStyle(ChatStyle parent)
Sets the fallback ChatStyle to use if this ChatStyle does not override some value.
|
ChatStyle |
setStrikethrough(java.lang.Boolean strikethrough)
Sets whether or not to format text of this ChatStyle using strikethrough.
|
ChatStyle |
setUnderlined(java.lang.Boolean underlined)
Sets whether or not text of this ChatStyle should be underlined.
|
java.lang.String |
toString() |
private ChatStyle parentStyle
private EnumChatFormatting color
private java.lang.Boolean bold
private java.lang.Boolean italic
private java.lang.Boolean underlined
private java.lang.Boolean strikethrough
private java.lang.Boolean obfuscated
private ClickEvent chatClickEvent
private HoverEvent chatHoverEvent
private java.lang.String insertion
private static final ChatStyle rootStyle
public EnumChatFormatting getColor()
public boolean getBold()
public boolean getItalic()
public boolean getStrikethrough()
public boolean getUnderlined()
public boolean getObfuscated()
public boolean isEmpty()
public ClickEvent getChatClickEvent()
public HoverEvent getChatHoverEvent()
public java.lang.String getInsertion()
public ChatStyle setColor(EnumChatFormatting color)
public ChatStyle setBold(java.lang.Boolean boldIn)
public ChatStyle setItalic(java.lang.Boolean italic)
public ChatStyle setStrikethrough(java.lang.Boolean strikethrough)
public ChatStyle setUnderlined(java.lang.Boolean underlined)
public ChatStyle setObfuscated(java.lang.Boolean obfuscated)
public ChatStyle setChatClickEvent(ClickEvent event)
public ChatStyle setChatHoverEvent(HoverEvent event)
public ChatStyle setInsertion(java.lang.String insertion)
public ChatStyle setParentStyle(ChatStyle parent)
public java.lang.String getFormattingCode()
private ChatStyle getParent()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object p_equals_1_)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public ChatStyle createShallowCopy()
public ChatStyle createDeepCopy()