Interface SelectorComponent

All Superinterfaces:
Component, ComponentBuilderApplicable, ComponentLike, HoverEventSource<Component>, ScopedComponent<SelectorComponent>, StyleGetter, StyleSetter<Component>

public sealed interface SelectorComponent extends ScopedComponent<SelectorComponent>
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
  • Method Details

    • pattern

      String pattern()
      Gets the selector pattern.
      Returns:
      the selector pattern
      Since:
      4.0.0
    • pattern

      @Contract(pure=true) SelectorComponent pattern(String 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

      SelectorComponent separator(@Nullable ComponentLike separator)
      Sets the separator.
      Parameters:
      separator - the separator
      Returns:
      the separator
      Since:
      4.8.0
    • toBuilder

      Description copied from interface: Component
      Returns a builder for this component.
      Specified by:
      toBuilder in interface Component
      Specified by:
      toBuilder in interface ScopedComponent<SelectorComponent>
      Returns:
      the builder