Package net.kyori.adventure.text.format
Interface StyleGetter
- 
- All Known Subinterfaces:
- BlockNBTComponent,- BuildableComponent<C,B>,- Component,- EntityNBTComponent,- KeybindComponent,- NBTComponent<C,B>,- ScopedComponent<C>,- ScoreComponent,- SelectorComponent,- StorageNBTComponent,- Style,- TextComponent,- TranslatableComponent
 - All Known Implementing Classes:
- AbstractComponent
 
 @NonExtendable public interface StyleGetterReads style properties from an object.- Since:
- 4.10.0
- See Also:
- Style
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @Nullable ClickEventclickEvent()Gets the click event.@Nullable TextColorcolor()Gets the color.@NotNull TextDecoration.Statedecoration(@NotNull TextDecoration decoration)Gets the state of a decoration on this stylable.default @Unmodifiable @NotNull Map<TextDecoration,TextDecoration.State>decorations()Gets a map of decorations this stylable has.@Nullable Keyfont()Gets the font.default booleanhasDecoration(@NotNull TextDecoration decoration)Tests if this stylable has a decoration.@Nullable HoverEvent<?>hoverEvent()Gets the hover event.@Nullable Stringinsertion()Gets the string to be inserted when this stylable is shift-clicked.
 
- 
- 
- 
Method Detail- 
font@Nullable @Nullable Key font() Gets the font.- Returns:
- the font
- Since:
- 4.10.0
- Since Minecraft:
- 1.16
 
 - 
color@Nullable @Nullable TextColor color() Gets the color.- Returns:
- the color
- Since:
- 4.10.0
 
 - 
hasDecorationdefault boolean hasDecoration(@NotNull @NotNull TextDecoration decoration)Tests if this stylable has a decoration.- Parameters:
- decoration- the decoration
- Returns:
- trueif this stylable has the decoration,- falseif this stylable does not have the decoration
- Since:
- 4.10.0
 
 - 
decoration@NotNull TextDecoration.State decoration(@NotNull @NotNull TextDecoration decoration) Gets the state of a decoration on this stylable.- Parameters:
- decoration- the decoration
- Returns:
- TextDecoration.State.TRUEif this stylable has the decoration,- TextDecoration.State.FALSEif this stylable does not have the decoration, and- TextDecoration.State.NOT_SETif not set
- Since:
- 4.10.0
 
 - 
decorations@NotNull default @Unmodifiable @NotNull Map<TextDecoration,TextDecoration.State> decorations() Gets a map of decorations this stylable has.- Returns:
- a set of decorations this stylable has
- Since:
- 4.10.0
 
 - 
clickEvent@Nullable @Nullable ClickEvent clickEvent() Gets the click event.- Returns:
- the click event
- Since:
- 4.10.0
 
 - 
hoverEvent@Nullable @Nullable HoverEvent<?> hoverEvent() Gets the hover event.- Returns:
- the hover event
- Since:
- 4.10.0
 
 - 
insertion@Nullable @Nullable String insertion() Gets the string to be inserted when this stylable is shift-clicked.- Returns:
- the insertion string
- Since:
- 4.10.0
 
 
- 
 
-