- All Implemented Interfaces:
Serializable,Comparable<TextDecoration>,Constable,ComponentBuilderApplicable,StyleBuilderApplicable,TextFormat
public enum TextDecoration
extends Enum<TextDecoration>
implements StyleBuilderApplicable, TextFormat
An enumeration of decorations which may be applied to a
Component.- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA decoration which makes text appear bold.A decoration which makes text appear in italics.A decoration which makes text obfuscated/unreadable.A decoration which makes text have a strike through it.A decoration which makes text have an underline. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidstyleApply(Style.Builder style) Applies tostyle.toString()static TextDecorationReturns the enum constant of this class with the specified name.static TextDecoration[]values()Returns an array containing the constants of this enum class, in the order they are declared.final TextDecorationAndStatewithState(boolean state) Creates aTextDecorationAndState, annotating this decoration with the givenstate.final TextDecorationAndStatewithState(TextDecoration.State state) Creates aTextDecorationAndState, annotating this decoration with the givenstate.final TextDecorationAndStateCreates aTextDecorationAndState, annotating this decoration with the givenstate.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from interface net.kyori.adventure.text.format.StyleBuilderApplicable
componentBuilderApply
-
Enum Constant Details
-
OBFUSCATED
A decoration which makes text obfuscated/unreadable.- Since:
- 4.0.0
-
BOLD
A decoration which makes text appear bold.- Since:
- 4.0.0
-
STRIKETHROUGH
A decoration which makes text have a strike through it.- Since:
- 4.0.0
-
UNDERLINED
A decoration which makes text have an underline.- Since:
- 4.0.0
-
ITALIC
A decoration which makes text appear in italics.- Since:
- 4.0.0
-
-
Field Details
-
NAMES
The name map.- Since:
- 4.0.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
withState
Creates aTextDecorationAndState, annotating this decoration with the givenstate.- Parameters:
state- the state- Returns:
- a
TextDecorationAndState - Since:
- 4.10.0
-
withState
Creates aTextDecorationAndState, annotating this decoration with the givenstate.- Parameters:
state- the state- Returns:
- a
TextDecorationAndState - Since:
- 4.10.0
-
withState
Creates aTextDecorationAndState, annotating this decoration with the givenstate.- Parameters:
state- the state- Returns:
- a
TextDecorationAndState - Since:
- 4.10.0
-
styleApply
Description copied from interface:StyleBuilderApplicableApplies tostyle.- Specified by:
styleApplyin interfaceStyleBuilderApplicable- Parameters:
style- the style builder
-
toString
- Overrides:
toStringin classEnum<TextDecoration>
-