Interface DisplayHandler<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.util.Collection<java.lang.String> format​(@NotNull org.bukkit.command.CommandSender sender, @NotNull ContentDisplay<T> display)
      Formats the raw content into a Collection for displaying to the given sender.
      default void sendBody​(@NotNull org.bukkit.command.CommandSender sender, @NotNull ContentDisplay<T> display, java.util.Collection<java.lang.String> formattedContent)
      Sends the content.
      default void sendHeader​(@NotNull org.bukkit.command.CommandSender sender, @NotNull ContentDisplay<T> display)
      Sends the header.
      default void sendSubHeader​(@NotNull org.bukkit.command.CommandSender sender, @NotNull ContentDisplay<T> display)
      Sends info such as filter and page.
    • Method Detail

      • format

        java.util.Collection<java.lang.String> format​(@NotNull
                                                      @NotNull org.bukkit.command.CommandSender sender,
                                                      @NotNull
                                                      @NotNull ContentDisplay<T> display)
                                               throws DisplayFormatException
        Formats the raw content into a Collection for displaying to the given sender.
        Parameters:
        sender - The CommandSender who will the content will be displayed to.
        display - The responsible ContentDisplay.
        Returns:
        The formatted content.
        Throws:
        DisplayFormatException - Issue occurred while formatting content. E.g. invalid page.
      • sendHeader

        default void sendHeader​(@NotNull
                                @NotNull org.bukkit.command.CommandSender sender,
                                @NotNull
                                @NotNull ContentDisplay<T> display)
        Sends the header.
        Parameters:
        sender - The CommandSender who will the header will be displayed to.
        display - The responsible ContentDisplay.
      • sendSubHeader

        default void sendSubHeader​(@NotNull
                                   @NotNull org.bukkit.command.CommandSender sender,
                                   @NotNull
                                   @NotNull ContentDisplay<T> display)
        Sends info such as filter and page.
        Parameters:
        sender - The CommandSender who will the sub header will be displayed to.
        display - The responsible ContentDisplay.
      • sendBody

        default void sendBody​(@NotNull
                              @NotNull org.bukkit.command.CommandSender sender,
                              @NotNull
                              @NotNull ContentDisplay<T> display,
                              java.util.Collection<java.lang.String> formattedContent)
        Sends the content.
        Parameters:
        sender - The CommandSender who will the body will be displayed to.
        display - The responsible ContentDisplay.
        formattedContent - The content after being formatted by format(CommandSender, ContentDisplay)