Interface ComponentLike

    • Method Detail

      • asComponents

        @NotNull
        static @NotNull java.util.List<Component> asComponents​(@NotNull
                                                               @NotNull java.util.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 java.util.List<Component> asComponents​(@NotNull
                                                               @NotNull java.util.List<? extends ComponentLike> likes,
                                                               @Nullable
                                                               @Nullable java.util.function.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