Interface ContentSource<T>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ContentSource<T>
Supplies the items that a pagination session will show.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> @NotNull ContentSource<T>
    dynamic(@NotNull Function<org.bukkit.entity.Player,List<T>> source)
    Returns a source backed by a function.
    static <T> @NotNull ContentSource<T>
    of(@NotNull List<T> items)
    Returns a source backed by a fixed list.
    @NotNull List<T>
    provide(@NotNull org.bukkit.entity.Player viewer)
    Returns the full item list for the viewer.
  • Method Details

    • provide

      @NotNull @NotNull List<T> provide(@NotNull @NotNull org.bukkit.entity.Player viewer)
      Returns the full item list for the viewer.
    • of

      @NotNull static <T> @NotNull ContentSource<T> of(@NotNull @NotNull List<T> items)
      Returns a source backed by a fixed list.
    • dynamic

      @NotNull static <T> @NotNull ContentSource<T> dynamic(@NotNull @NotNull Function<org.bukkit.entity.Player,List<T>> source)
      Returns a source backed by a function.