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>, ObjectComponent.Builder, 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(TextDecoration... decorations) SetsdecorationstoTextDecoration.State.TRUE.default Tdecorations(Map<TextDecoration, TextDecoration.State> decorations) Sets decorations using the specifieddecorationsmap.default Tdecorations(Set<TextDecoration> decorations, boolean flag) Sets the state of a set of decorations toflag.Methods inherited from interface StyleSetter
clickEvent, color, colorIfAbsent, decorate, decoration, decoration, decorationIfAbsent, font, hoverEvent, insertion, shadowColor, shadowColorIfAbsent
-
Method Details
-
decorate
SetsdecorationstoTextDecoration.State.TRUE.- Specified by:
decoratein interfaceStyleSetter<T extends MutableStyleSetter<?>>- Parameters:
decorations- the decorations- Returns:
- a mutable object (
T) - Since:
- 4.10.0
-
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
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
-