Interface ComponentLike

    • Method Detail

      • asComponents

        @NotNull
        static @NotNull List<Component> asComponents​(@NotNull
                                                     @NotNull List<? extends ComponentLike> likes)
        Converts a list of ComponentLikes to a list of Components.
        Parameters:
        likes - the component-likes
        Returns:
        the components
        Since:
        4.8.0
      • asComponents

        @NotNull
        static @NotNull List<Component> asComponents​(@NotNull
                                                     @NotNull List<? extends ComponentLike> likes,
                                                     @Nullable
                                                     @Nullable Predicate<? super Component> filter)
        Converts a list of ComponentLikes to a list of Components.

        Only components that match filter will be returned.

        Parameters:
        likes - the component-likes
        filter - the component filter
        Returns:
        the components
        Since:
        4.8.0
      • unbox

        @Nullable
        static @Nullable Component unbox​(@Nullable
                                         @Nullable ComponentLike like)
        Fetches a Component from a ComponentLike.
        Parameters:
        like - the component-like
        Returns:
        a component, or null
        Since:
        4.8.0
      • asComponent

        @Contract(pure=true)
        @NotNull
        @NotNull Component asComponent()
        Gets a Component representation.
        Returns:
        a component
        Since:
        4.0.0