Interface ListComponent

All Superinterfaces:
BuildableComponent<ListComponent,ListComponent.Builder>, Component, ComponentLike

public interface ListComponent extends BuildableComponent<ListComponent,ListComponent.Builder>
A component that contains a list of components.
  • Method Details

    • components

      static ListComponent components(Component... components)
      Creates a new list component with the specified components.
      Parameters:
      components - the components
      Returns:
      the list component
    • components

      static ListComponent components(ComponentColor textColor, Component... components)
      Creates a new list component with the specified text color and components.
      Parameters:
      textColor - the text color
      components - the components
      Returns:
      the list component
    • components

      static ListComponent components(TextStyle textStyle, Component... components)
      Creates a new list component with the specified text textStyle and components.
      Parameters:
      textStyle - the text textStyle
      components - the components
      Returns:
      the list component
    • components

      static ListComponent.Builder components()
      Creates a new list component builder.
    • getComponents

      List<Component> getComponents()
      Returns the components in this list component.
    • append

      default ListComponent append(ComponentLike component)
      Description copied from interface: Component
      Appends the given component to this component.
      Specified by:
      append in interface Component
      Parameters:
      component - the component to append
      Returns:
      the concatenated component
    • compress

      default Component compress()
      Description copied from interface: Component
      Compresses this component. Removing empty subcommands and/or merging subcomponents if necessary.
      Specified by:
      compress in interface Component
      Returns:
      the compressed component