| Constructor and Description |
|---|
Style() |
Style(TextFormatting color,
java.lang.Boolean obfuscated,
java.lang.Boolean bold,
java.lang.Boolean strikethrough,
java.lang.Boolean underlined,
java.lang.Boolean italic,
ClickEvent clickEvent,
HoverEvent hoverEvent,
java.lang.String insertion,
FontDescription font) |
Style(TextFormatting color,
java.lang.Boolean obfuscated,
java.lang.Boolean bold,
java.lang.Boolean strikethrough,
java.lang.Boolean underlined,
java.lang.Boolean italic,
ClickEvent clickEvent,
HoverEvent hoverEvent,
java.lang.String insertion,
com.viaversion.viaversion.libs.mcstructs.core.Identifier font) |
Style(TextFormatting color,
java.lang.Integer shadowColor,
java.lang.Boolean obfuscated,
java.lang.Boolean bold,
java.lang.Boolean strikethrough,
java.lang.Boolean underlined,
java.lang.Boolean italic,
ClickEvent clickEvent,
HoverEvent hoverEvent,
java.lang.String insertion,
FontDescription font) |
Style(TextFormatting color,
java.lang.Integer shadowColor,
java.lang.Boolean obfuscated,
java.lang.Boolean bold,
java.lang.Boolean strikethrough,
java.lang.Boolean underlined,
java.lang.Boolean italic,
ClickEvent clickEvent,
HoverEvent hoverEvent,
java.lang.String insertion,
com.viaversion.viaversion.libs.mcstructs.core.Identifier font) |
| Modifier and Type | Method and Description |
|---|---|
Style |
copy() |
boolean |
equals(java.lang.Object o) |
java.lang.Boolean |
getBold() |
ClickEvent |
getClickEvent() |
TextFormatting |
getColor() |
FontDescription |
getFont() |
TextFormatting[] |
getFormattings()
Get the formattings of this style.
The color will always be the first element in the array. |
TextFormatting[] |
getFormattings(boolean includeColor)
Get the formattings of this style.
The color will always be the first element in the array. |
HoverEvent |
getHoverEvent() |
java.lang.String |
getInsertion() |
java.lang.Boolean |
getItalic() |
java.lang.Boolean |
getObfuscated() |
Style |
getParent() |
java.lang.Integer |
getShadowColor() |
java.lang.Boolean |
getStrikethrough() |
java.lang.Boolean |
getUnderlined() |
int |
hashCode() |
boolean |
isBold() |
boolean |
isEmpty() |
boolean |
isItalic() |
boolean |
isObfuscated() |
boolean |
isStrikethrough() |
boolean |
isUnderlined() |
void |
mergeParent()
Merge the parent style with this style.
This removes the reference to the parent style while maintaining the formatting. |
Style |
setBold(java.lang.Boolean bold)
Set this style to be bold.
|
Style |
setClickEvent(ClickEvent clickEvent)
Set the click event of this style.
|
Style |
setColor(int rgb)
Set the rgb color of this style.
|
Style |
setFont(FontDescription font)
Set the font of this style.
|
Style |
setFont(com.viaversion.viaversion.libs.mcstructs.core.Identifier font)
Set the font of this style.
|
Style |
setFormatting(TextFormatting... formattings)
Set multiple formattings to this style.
|
Style |
setFormatting(TextFormatting formatting)
Set a formatting to this style.
|
Style |
setHoverEvent(HoverEvent hoverEvent)
Set the hover event of this style.
|
Style |
setInsertion(java.lang.String insertion)
Set the insertion of this style.
|
Style |
setItalic(java.lang.Boolean italic)
Set this style to be italic.
|
Style |
setObfuscated(java.lang.Boolean obfuscated)
Set this style to be obfuscated.
|
Style |
setParent(Style style)
Set the parent style.
|
Style |
setShadowColor(java.lang.Integer shadowColor)
Set the shadow color of this style.
|
Style |
setStrikethrough(java.lang.Boolean strikethrough)
Set this style to be strikethrough.
|
Style |
setUnderlined(java.lang.Boolean underlined)
Set this style to be underlined.
|
java.lang.String |
toString() |
public Style()
public Style(TextFormatting color, java.lang.Boolean obfuscated, java.lang.Boolean bold, java.lang.Boolean strikethrough, java.lang.Boolean underlined, java.lang.Boolean italic, ClickEvent clickEvent, HoverEvent hoverEvent, java.lang.String insertion, com.viaversion.viaversion.libs.mcstructs.core.Identifier font)
public Style(TextFormatting color, java.lang.Boolean obfuscated, java.lang.Boolean bold, java.lang.Boolean strikethrough, java.lang.Boolean underlined, java.lang.Boolean italic, ClickEvent clickEvent, HoverEvent hoverEvent, java.lang.String insertion, FontDescription font)
public Style(TextFormatting color, java.lang.Integer shadowColor, java.lang.Boolean obfuscated, java.lang.Boolean bold, java.lang.Boolean strikethrough, java.lang.Boolean underlined, java.lang.Boolean italic, ClickEvent clickEvent, HoverEvent hoverEvent, java.lang.String insertion, com.viaversion.viaversion.libs.mcstructs.core.Identifier font)
public Style(TextFormatting color, java.lang.Integer shadowColor, java.lang.Boolean obfuscated, java.lang.Boolean bold, java.lang.Boolean strikethrough, java.lang.Boolean underlined, java.lang.Boolean italic, ClickEvent clickEvent, HoverEvent hoverEvent, java.lang.String insertion, FontDescription font)
public Style setParent(Style style)
style - The parent stylepublic Style getParent()
public Style setFormatting(TextFormatting formatting)
formatting - The formattingpublic Style setFormatting(TextFormatting... formattings)
formattings - The formattingspublic TextFormatting[] getFormattings()
public TextFormatting[] getFormattings(boolean includeColor)
includeColor - If the color should be includedpublic Style setColor(int rgb)
rgb - The rgb colorpublic TextFormatting getColor()
public Style setShadowColor(java.lang.Integer shadowColor)
shadowColor - The shadow colorpublic java.lang.Integer getShadowColor()
public Style setBold(java.lang.Boolean bold)
bold - The bold state (use null to reset)public java.lang.Boolean getBold()
public boolean isBold()
public Style setItalic(java.lang.Boolean italic)
italic - The italic state (use null to reset)public java.lang.Boolean getItalic()
public boolean isItalic()
public Style setUnderlined(java.lang.Boolean underlined)
underlined - The underlined state (use null to reset)public java.lang.Boolean getUnderlined()
public boolean isUnderlined()
public Style setStrikethrough(java.lang.Boolean strikethrough)
strikethrough - The strikethrough state (use null to reset)public java.lang.Boolean getStrikethrough()
public boolean isStrikethrough()
public Style setObfuscated(java.lang.Boolean obfuscated)
obfuscated - The obfuscated state (use null to reset)public java.lang.Boolean getObfuscated()
public boolean isObfuscated()
public Style setClickEvent(ClickEvent clickEvent)
clickEvent - The click eventpublic ClickEvent getClickEvent()
public Style setHoverEvent(HoverEvent hoverEvent)
hoverEvent - The hover eventpublic HoverEvent getHoverEvent()
public Style setInsertion(java.lang.String insertion)
insertion - The insertionpublic java.lang.String getInsertion()
public Style setFont(com.viaversion.viaversion.libs.mcstructs.core.Identifier font)
font - The fontpublic Style setFont(FontDescription font)
font - The fontpublic FontDescription getFont()
public boolean isEmpty()
public void mergeParent()
public Style copy()
copy in interface com.viaversion.viaversion.libs.mcstructs.core.Copyable<Style>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object