public final class ComponentStyle extends Object implements Cloneable
BaseComponent.| Constructor and Description |
|---|
ComponentStyle() |
ComponentStyle(ChatColor color,
String font,
Boolean bold,
Boolean italic,
Boolean underlined,
Boolean strikethrough,
Boolean obfuscated) |
| Modifier and Type | Method and Description |
|---|---|
static ComponentStyleBuilder |
builder()
Get a new
ComponentStyleBuilder. |
static ComponentStyleBuilder |
builder(ComponentStyle other)
Get a new
ComponentStyleBuilder with values initialized to the
style values of the supplied ComponentStyle. |
ComponentStyle |
clone() |
boolean |
equals(Object o) |
ChatColor |
getColor()
Returns the color of this style.
|
String |
getFont()
Returns the font of this style.
|
boolean |
hasColor()
Returns whether or not this style has a color set.
|
boolean |
hasFont()
Returns whether or not this style has a font set.
|
int |
hashCode() |
boolean |
isBold()
Returns whether this style is bold.
|
Boolean |
isBoldRaw()
Returns whether this style is bold.
|
boolean |
isEmpty()
Returns whether this style has any formatting explicitly set.
|
boolean |
isItalic()
Returns whether this style is italic.
|
Boolean |
isItalicRaw()
Returns whether this style is italic.
|
boolean |
isObfuscated()
Returns whether this style is obfuscated.
|
Boolean |
isObfuscatedRaw()
Returns whether this style is obfuscated.
|
boolean |
isStrikethrough()
Returns whether this style is strikethrough
|
Boolean |
isStrikethroughRaw()
Returns whether this style is strikethrough.
|
boolean |
isUnderlined()
Returns whether this style is underlined.
|
Boolean |
isUnderlinedRaw()
Returns whether this style is underlined.
|
void |
setBold(Boolean bold)
Whether this style is bold.
|
void |
setColor(ChatColor color)
The color of this style.
|
void |
setFont(String font)
The font of this style.
|
void |
setItalic(Boolean italic)
Whether this style is italic.
|
void |
setObfuscated(Boolean obfuscated)
Whether this style is obfuscated.
|
void |
setStrikethrough(Boolean strikethrough)
Whether this style is strikethrough.
|
void |
setUnderlined(Boolean underlined)
Whether this style is underlined.
|
public ComponentStyle(ChatColor color, String font, Boolean bold, Boolean italic, Boolean underlined, Boolean strikethrough, Boolean obfuscated)
public ComponentStyle()
public ChatColor getColor()
public boolean hasColor()
public String getFont()
public boolean hasFont()
public boolean isBold()
public Boolean isBoldRaw()
public boolean isItalic()
public Boolean isItalicRaw()
public boolean isUnderlined()
public Boolean isUnderlinedRaw()
public boolean isStrikethrough()
public Boolean isStrikethroughRaw()
public boolean isObfuscated()
public Boolean isObfuscatedRaw()
public boolean isEmpty()
public ComponentStyle clone()
public static ComponentStyleBuilder builder()
ComponentStyleBuilder.public static ComponentStyleBuilder builder(ComponentStyle other)
ComponentStyleBuilder with values initialized to the
style values of the supplied ComponentStyle.other - the component style whose values to copy into the builderpublic void setColor(ChatColor color)
public void setFont(String font)
public void setBold(Boolean bold)
public void setItalic(Boolean italic)
public void setUnderlined(Boolean underlined)
public void setStrikethrough(Boolean strikethrough)
public void setObfuscated(Boolean obfuscated)
Copyright © 2012–2024 SpigotMC. All rights reserved.