Package net.kyori.adventure.text.format
Interface MutableStyleSetter<T extends MutableStyleSetter<?>>
- Type Parameters:
T- The type implementing this interface e.g.Component
- All Superinterfaces:
StyleSetter<T>
- All Known Subinterfaces:
BlockNBTComponent.Builder,ComponentBuilder<C,,B> EntityNBTComponent.Builder,KeybindComponent.Builder,NBTComponentBuilder<C,,B> ScoreComponent.Builder,SelectorComponent.Builder,StorageNBTComponent.Builder,Style.Builder,TextComponent.Builder,TranslatableComponent.Builder
@NonExtendable
public interface MutableStyleSetter<T extends MutableStyleSetter<?>>
extends StyleSetter<T>
Writes style properties to a mutable object. Used to override some default methods from
StyleSetter
with faster alternatives that only work for mutable objects.- Since:
- 4.10.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault Tdecorate(@NotNull TextDecoration @NotNull ... decorations) SetsdecorationstoTextDecoration.State.TRUE.default Tdecorations(@NotNull Map<TextDecoration, TextDecoration.State> decorations) Sets decorations using the specifieddecorationsmap.default Tdecorations(@NotNull Set<TextDecoration> decorations, boolean flag) Sets the state of a set of decorations toflag.Methods inherited from interface net.kyori.adventure.text.format.StyleSetter
clickEvent, color, colorIfAbsent, decorate, decoration, decoration, decorationIfAbsent, font, hoverEvent, insertion, shadowColor, shadowColorIfAbsent
-
Method Details
-
decorate
@Contract("_ -> this") @NotNull default T decorate(@NotNull @NotNull TextDecoration @NotNull ... decorations) SetsdecorationstoTextDecoration.State.TRUE.- Specified by:
decoratein interfaceStyleSetter<T extends MutableStyleSetter<?>>- Parameters:
decorations- the decorations- Returns:
- a mutable object (
T) - Since:
- 4.10.0
-
decorations
@Contract("_ -> this") @NotNull default T decorations(@NotNull @NotNull Map<TextDecoration, TextDecoration.State> decorations) Sets decorations using the specifieddecorationsmap.If a given decoration does not have a value explicitly set, the value of that particular decoration is not changed.
- Specified by:
decorationsin interfaceStyleSetter<T extends MutableStyleSetter<?>>- Parameters:
decorations- a map containing text decorations and their respective state.- Returns:
- a mutable object (
T) - Since:
- 4.10.0
-
decorations
@Contract("_, _ -> this") @NotNull default T decorations(@NotNull @NotNull Set<TextDecoration> decorations, boolean flag) Sets the state of a set of decorations toflag.- Specified by:
decorationsin interfaceStyleSetter<T extends MutableStyleSetter<?>>- Parameters:
decorations- the decorationsflag-trueif this mutable object should have the decorations,falseif this mutable object should not have the decorations- Returns:
- a mutable object (
T) - Since:
- 4.10.0
-