- All Superinterfaces:
Buildable<SelectorComponent.Builder>,BuildableComponent<SelectorComponent,,SelectorComponent.Builder> Component,ComponentBuilderApplicable,ComponentLike,HoverEventSource<Component>,ScopedComponent<SelectorComponent>,StyleGetter,StyleSetter<Component>
public sealed interface SelectorComponent
extends ScopedComponent<SelectorComponent>, BuildableComponent<SelectorComponent,SelectorComponent.Builder>
A component that can display the name of entities found with a given selector.
This component consists of:
- selector
- a Minecraft selector.(e.g
@p,@a)
This component is rendered serverside and can therefore receive platform-defined context. See the documentation for your respective platform for more info
- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA selector component builder. -
Field Summary
Fields inherited from interface net.kyori.adventure.text.Component
EQUALS, EQUALS_IDENTITY, IS_NOT_EMPTY -
Method Summary
Modifier and TypeMethodDescriptionpattern()Gets the selector pattern.Sets the selector pattern.@Nullable ComponentGets the separator.separator(@Nullable ComponentLike separator) Sets the separator.Returns a builder for this component.Methods inherited from interface net.kyori.adventure.text.Component
asHoverEvent, children, clickEvent, color, compact, compact, componentBuilderApply, contains, contains, decoration, decorations, font, hasDecoration, hasStyling, hoverEvent, insertion, iterable, iterable, iterator, iterator, replaceText, replaceText, shadowColor, spliterator, spliterator, styleMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface net.kyori.adventure.text.ScopedComponent
append, append, append, append, append, appendNewline, appendSpace, applyFallbackStyle, applyFallbackStyle, asComponent, children, clickEvent, color, colorIfAbsent, decorate, decoration, decoration, decorationIfAbsent, decorations, font, hoverEvent, insertion, mergeStyle, mergeStyle, mergeStyle, shadowColor, shadowColorIfAbsent, style, style, style, styleMethods inherited from interface net.kyori.adventure.text.format.StyleSetter
decorate, decorations
-
Method Details
-
pattern
String pattern()Gets the selector pattern.- Returns:
- the selector pattern
- Since:
- 4.0.0
-
pattern
Sets the selector pattern.- Parameters:
pattern- the selector pattern- Returns:
- a selector component
- Since:
- 4.0.0
-
separator
@Nullable Component separator()Gets the separator.- Returns:
- the separator
- Since:
- 4.8.0
-
separator
Sets the separator.- Parameters:
separator- the separator- Returns:
- the separator
- Since:
- 4.8.0
-
toBuilder
SelectorComponent.Builder toBuilder()Description copied from interface:ComponentReturns a builder for this component.- Specified by:
toBuilderin interfaceBuildable<SelectorComponent.Builder>- Specified by:
toBuilderin interfaceBuildableComponent<SelectorComponent,SelectorComponent.Builder> - Specified by:
toBuilderin interfaceComponent- Specified by:
toBuilderin interfaceScopedComponent<SelectorComponent>- Returns:
- the builder
-