Interface StyleGetter
- All Known Subinterfaces:
BlockNBTComponent, Component, EntityNBTComponent, KeybindComponent, NBTComponent<C>, ObjectComponent, ScopedComponent<C>, ScoreComponent, SelectorComponent, StorageNBTComponent, Style, TextComponent, TranslatableComponent, VirtualComponent
@NonExtendable
public interface StyleGetter
Reads style properties from an object.
- Since:
- 4.10.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescription@Nullable ClickEvent<?> Gets the click event.@Nullable TextColorcolor()Gets the color.decoration(TextDecoration decoration) Gets the state of a decoration on this stylable.default @Unmodifiable Map<TextDecoration, TextDecoration.State> Gets a map of decorations this stylable has.@Nullable Keyfont()Gets the font.default booleanhasDecoration(TextDecoration decoration) Tests if this stylable has a decoration.@Nullable HoverEvent<?> Gets the hover event.@Nullable StringGets the string to be inserted when this stylable is shift-clicked.@Nullable ShadowColorGets the shadow color.
-
Method Details
-
font
-
color
-
shadowColor
-
hasDecoration
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
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, andTextDecoration.State.NOT_SETif not set- Since:
- 4.10.0
-
decorations
Gets a map of decorations this stylable has.- Returns:
- a set of decorations this stylable has
- Since:
- 4.10.0
-
clickEvent
-
hoverEvent
-
insertion
@Nullable String insertion()Gets the string to be inserted when this stylable is shift-clicked.- Returns:
- the insertion string
- Since:
- 4.10.0
-