Interface TabGui

All Superinterfaces:
Gui
All Known Implementing Classes:
AbstractTabGui

public interface TabGui extends Gui
  • Method Details

    • normal

      @NotNull static @NotNull TabGui.Builder normal()
      Creates a new Gui Builder for a TabGui.
      Returns:
      The new Gui Builder.
    • normal

      @NotNull static @NotNull TabGui normal(@NotNull @NotNull Consumer<@NotNull TabGui.Builder> consumer)
      Creates a new TabGui after configuring a Gui Builder using the given Consumer.
      Parameters:
      consumer - The Consumer to configure the Gui Builder.
      Returns:
      The created TabGui.
    • of

      @NotNull static @NotNull TabGui of(int width, int height, @NotNull @NotNull List<@Nullable Gui> tabs, int... contentListSlots)
      Creates a new TabGui.
      Parameters:
      width - The width of the TabGui.
      height - The height of the TabGui.
      tabs - The Guis to use as tabs.
      contentListSlots - The slots where content should be displayed.
      Returns:
      The created TabGui.
    • of

      @NotNull static @NotNull TabGui of(Structure structure, @NotNull @NotNull List<@Nullable Gui> tabs)
      Creates a new TabGui.
      Parameters:
      structure - The Structure to use.
      tabs - The Guis to use as tabs.
      Returns:
      The created TabGui.
    • getCurrentTab

      int getCurrentTab()
      Gets the current tab index.
      Returns:
      The current tab index.
    • setTab

      void setTab(int tab)
      Sets the current tab.
      Parameters:
      tab - The index of the tab to show.
    • isTabAvailable

      boolean isTabAvailable(int tab)
      Checks if the given tab is available.
      Parameters:
      tab - The index of the tab to check.
      Returns:
      Whether the given tab is available.
    • getTabs

      @NotNull @NotNull List<@Nullable Gui> getTabs()
      Gets the configured tabs.
      Returns:
      The configured tabs.
    • getTabChangeHandlers

      @Nullable @Nullable List<@NotNull BiConsumer<Integer,Integer>> getTabChangeHandlers()
      Gets the registered tab change handlers.
      Returns:
      The registered tab change handlers.
    • setTabChangeHandlers

      void setTabChangeHandlers(@Nullable @Nullable List<@NotNull BiConsumer<Integer,Integer>> handlers)
      Replaces the currently registered tab change handlers with the given list.
      Parameters:
      handlers - The new page change handlers.
    • addTabChangeHandler

      void addTabChangeHandler(@NotNull @NotNull BiConsumer<Integer,Integer> handler)
      Registers a page change handler.
      Parameters:
      handler - The handler to register.
    • removeTabChangeHandler

      void removeTabChangeHandler(@NotNull @NotNull BiConsumer<Integer,Integer> handler)
      Unregisters a page change handler.
      Parameters:
      handler - The handler to unregister.