Package net.kyori.adventure.text
Interface ScopedComponent<C extends Component>
- Type Parameters:
- C- the component type
- All Superinterfaces:
- Component,- ComponentBuilderApplicable,- ComponentLike,- net.kyori.examination.Examinable,- HoverEventSource<Component>
- All Known Subinterfaces:
- BlockNBTComponent,- EntityNBTComponent,- KeybindComponent,- ScoreComponent,- SelectorComponent,- StorageNBTComponent,- TextComponent,- TranslatableComponent
public interface ScopedComponent<C extends Component> extends Component
Some magic to change return types.
- Since:
- 4.0.0
- 
Method SummaryModifier and Type Method Description default @NonNull Cappend(@NonNull Component component)Appends a component to this component.default @NonNull Cappend(@NonNull ComponentBuilder<?,?> builder)Appends a component to this component.default @NonNull Cappend(@NonNull ComponentLike component)Appends a component to this component.@NonNull Cchildren(@NonNull List<? extends ComponentLike> children)Sets the list of children.default @NonNull CclickEvent(@Nullable ClickEvent event)Sets the click event of this component.default @NonNull Ccolor(@Nullable TextColor color)Sets the color of this component.default @NonNull CcolorIfAbsent(@Nullable TextColor color)Sets the color if there isn't one set already.default @NonNull Componentdecorate(@NonNull TextDecoration decoration)Sets the state ofdecorationtoTextDecoration.State.TRUEon this component.default @NonNull Cdecoration(@NonNull TextDecoration decoration, boolean flag)Sets the state of a decoration on this component.default @NonNull Cdecoration(@NonNull TextDecoration decoration, @NonNull TextDecoration.State state)Sets the value of a decoration on this component.default @NonNull ChoverEvent(@Nullable HoverEventSource<?> event)Sets the hover event of this component.default @NonNull Cinsertion(@Nullable String insertion)Sets the string to be inserted when this component is shift-clicked.default @NonNull CmergeStyle(@NonNull Component that)Merges from another style into this component's style.default @NonNull CmergeStyle(@NonNull Component that, @NonNull Set<Style.Merge> merges)Merges from another style into this component's style.default @NonNull CmergeStyle(@NonNull Component that, @NonNull Style.Merge @NonNull ... merges)Merges from another style into this component's style.default @NonNull Cstyle(@NonNull Consumer<Style.Builder> style)Sets the style of this component.@NonNull Cstyle(@NonNull Style style)Sets the style of this component.default @NonNull Cstyle(@NonNull Style.Builder style)Sets the style of this component.Methods inherited from interface net.kyori.adventure.text.ComponentasComponent, asHoverEvent, children, clickEvent, color, componentBuilderApply, contains, decoration, decorations, decorations, detectCycle, hasDecoration, hasStyling, hoverEvent, insertion, replaceFirstText, replaceFirstText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, style, style
- 
Method Details- 
childrenDescription copied from interface:ComponentSets the list of children.The contents of childrenwill be copied.
- 
styleDescription copied from interface:ComponentSets the style of this component.
- 
styleDescription copied from interface:ComponentSets the style of this component.
- 
styleDescription copied from interface:ComponentSets the style of this component.
- 
mergeStyleDescription copied from interface:ComponentMerges from another style into this component's style.- Specified by:
- mergeStylein interface- Component
- Parameters:
- that- the other style
- Returns:
- a component
 
- 
mergeStyleDescription copied from interface:ComponentMerges from another style into this component's style.- Specified by:
- mergeStylein interface- Component
- Parameters:
- that- the other style
- merges- the style parts to merge
- Returns:
- a component
 
- 
appendDescription copied from interface:ComponentAppends a component to this component.
- 
appendDescription copied from interface:ComponentAppends a component to this component.
- 
appendDescription copied from interface:ComponentAppends a component to this component.
- 
mergeStyleDescription copied from interface:ComponentMerges from another style into this component's style.- Specified by:
- mergeStylein interface- Component
- Parameters:
- that- the other style
- merges- the style parts to merge
- Returns:
- a component
 
- 
colorDescription copied from interface:ComponentSets the color of this component.
- 
colorIfAbsentDescription copied from interface:ComponentSets the color if there isn't one set already.- Specified by:
- colorIfAbsentin interface- Component
- Parameters:
- color- the color
- Returns:
- this builder
 
- 
decorateDescription copied from interface:ComponentSets the state ofdecorationtoTextDecoration.State.TRUEon this component.
- 
decorationDescription copied from interface:ComponentSets the state of a decoration on this component.- Specified by:
- decorationin interface- Component
- Parameters:
- decoration- the decoration
- flag-- trueif this component should have the decoration,- falseif this component should not have the decoration
- Returns:
- a component
 
- 
decorationdefault @NonNull C decoration(@NonNull TextDecoration decoration, @NonNull TextDecoration.State state)Description copied from interface:ComponentSets the value of a decoration on this component.- Specified by:
- decorationin interface- Component
- Parameters:
- decoration- the decoration
- state-- TextDecoration.State.TRUEif this component should have the decoration,- TextDecoration.State.FALSEif this component should not have the decoration, and- TextDecoration.State.NOT_SETif the decoration should not have a set value
- Returns:
- a component
 
- 
clickEventDescription copied from interface:ComponentSets the click event of this component.- Specified by:
- clickEventin interface- Component
- Parameters:
- event- the click event
- Returns:
- a component
 
- 
hoverEventDescription copied from interface:ComponentSets the hover event of this component.- Specified by:
- hoverEventin interface- Component
- Parameters:
- event- the hover event source
- Returns:
- a component
 
- 
insertionDescription copied from interface:ComponentSets the string to be inserted when this component is shift-clicked.
 
-