Package net.md_5.bungee.api.chat
Class ComponentStyle
java.lang.Object
net.md_5.bungee.api.chat.ComponentStyle
- All Implemented Interfaces:
Cloneable
Represents a style that may be applied to a
BaseComponent
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentStyleBuilder
builder()
Get a newComponentStyleBuilder
.static ComponentStyleBuilder
builder
(ComponentStyle other) Get a newComponentStyleBuilder
with values initialized to the style values of the suppliedComponentStyle
.clone()
getColor()
Returns the color of this style.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.boolean
isBold()
Returns whether this style is bold.Returns whether this style is bold.boolean
isEmpty()
Returns whether this style has no formatting explicitly set.boolean
isItalic()
Returns whether this style is italic.Returns whether this style is italic.boolean
Returns whether this style is obfuscated.Returns whether this style is obfuscated.boolean
Returns whether this style is strikethroughReturns whether this style is strikethrough.boolean
Returns whether this style is underlined.Returns whether this style is underlined.
-
Constructor Details
-
ComponentStyle
public ComponentStyle()
-
-
Method Details
-
getColor
Returns the color of this style. May return null.- Returns:
- the color of this style, or null if default color
-
hasColor
public boolean hasColor()Returns whether or not this style has a color set.- Returns:
- whether a color is set
-
getFont
Returns the font of this style. May return null.- Returns:
- the font of this style, or null if default font
-
hasFont
public boolean hasFont()Returns whether or not this style has a font set.- Returns:
- whether a font is set
-
isBold
public boolean isBold()Returns whether this style is bold.- Returns:
- whether the style is bold
-
isBoldRaw
Returns whether this style is bold. May return null.- Returns:
- whether the style is bold, or null if not set
-
isItalic
public boolean isItalic()Returns whether this style is italic. May return null.- Returns:
- whether the style is italic
-
isItalicRaw
Returns whether this style is italic. May return null.- Returns:
- whether the style is italic, or null if not set
-
isUnderlined
public boolean isUnderlined()Returns whether this style is underlined.- Returns:
- whether the style is underlined
-
isUnderlinedRaw
Returns whether this style is underlined. May return null.- Returns:
- whether the style is underlined, or null if not set
-
isStrikethrough
public boolean isStrikethrough()Returns whether this style is strikethrough- Returns:
- whether the style is strikethrough
-
isStrikethroughRaw
Returns whether this style is strikethrough. May return null.- Returns:
- whether the style is strikethrough, or null if not set
-
isObfuscated
public boolean isObfuscated()Returns whether this style is obfuscated.- Returns:
- whether the style is obfuscated
-
isObfuscatedRaw
Returns whether this style is obfuscated. May return null.- Returns:
- whether the style is obfuscated, or null if not set
-
isEmpty
public boolean isEmpty()Returns whether this style has no formatting explicitly set.- Returns:
- true if no value is set, false if at least one is set
-
clone
-
builder
Get a newComponentStyleBuilder
.- Returns:
- the builder
-
builder
Get a newComponentStyleBuilder
with values initialized to the style values of the suppliedComponentStyle
.- Parameters:
other
- the component style whose values to copy into the builder- Returns:
- the builder
-