Class PagedInventoryBuilder

    • Method Detail

      • createBuilder

        @NotNull
        public static @NotNull PagedInventoryBuilder createBuilder​(@NotNull
                                                                   @NotNull org.bukkit.plugin.Plugin plugin)
        Creates a new builder instance
        Parameters:
        plugin - plugin owner
        Returns:
        builder
      • page

        @NotNull
        public @NotNull PagedInventoryBuilder page​(int page,
                                                   @NotNull
                                                   @NotNull org.bukkit.inventory.Inventory inventory)
        Sets the page number to the specified page
        Parameters:
        page - page number
        inventory - page
        Returns:
        this instance for chaining
      • page

        @NotNull
        public @NotNull PagedInventoryBuilder page​(int pageNum,
                                                   @NotNull
                                                   @NotNull Page page)
        Sets the page number to the specified page
        Parameters:
        pageNum - page number
        page - page
        Returns:
        this instance for chaining
      • navigationItem

        @NotNull
        public @NotNull PagedInventoryBuilder navigationItem​(int slot,
                                                             @NotNull
                                                             @NotNull NavigationItem navigationItem)
        Sets the specified inventory slot to the specified NavigationItem
        Parameters:
        slot - slot
        navigationItem - navigation item
        Returns:
        this instance for chaining
      • clickFunction

        @NotNull
        public @NotNull PagedInventoryBuilder clickFunction​(@NotNull
                                                            @NotNull Consumer<PageClick> clickListener)
        Adds a click function to listen for click events on the inventories.
        Parameters:
        clickListener - click listener
        Returns:
        this instance for chaining
      • closeFunction

        @NotNull
        public @NotNull PagedInventoryBuilder closeFunction​(@NotNull
                                                            @NotNull Consumer<PageClose> closeListener)
        Adds a close function to listen for close events on the inventories.
        Parameters:
        closeListener - close listener
        Returns:
        this instance for chaining