Package dev.triumphteam.gui.guis
Class ScrollingGui
java.lang.Object
dev.triumphteam.gui.guis.BaseGui
dev.triumphteam.gui.guis.PaginatedGui
dev.triumphteam.gui.guis.ScrollingGui
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder
GUI that allows you to scroll through items
-
Constructor Summary
ConstructorsConstructorDescriptionScrollingGui(int rows, int pageSize, @NotNull String title) Deprecated.ScrollingGui(int rows, int pageSize, @NotNull String title, @NotNull ScrollType scrollType) Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set)ScrollingGui(int rows, int pageSize, @NotNull String title, @NotNull ScrollType scrollType, @NotNull Set<InteractionModifier> interactionModifiers) Main constructor of the Scrolling GUIScrollingGui(int rows, @NotNull String title) Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set)ScrollingGui(int rows, @NotNull String title, @NotNull ScrollType scrollType) Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set)ScrollingGui(@NotNull String title) Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set)ScrollingGui(@NotNull String title, @NotNull ScrollType scrollType) Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set) -
Method Summary
Modifier and TypeMethodDescriptionbooleannext()OverridesPaginatedGui.next()to make it work with the specific scrollsvoidopen(@NotNull org.bukkit.entity.HumanEntity player) OverridesPaginatedGui.open(HumanEntity)to make it work with the specific scrollsvoidopen(@NotNull org.bukkit.entity.HumanEntity player, int openPage) OverridesPaginatedGui.open(HumanEntity, int)to make it work with the specific scrollsbooleanprevious()OverridesPaginatedGui.previous()to make it work with the specific scrollsMethods inherited from class dev.triumphteam.gui.guis.PaginatedGui
addItem, addItem, clearPageItems, clearPageItems, getCurrentPageItems, getCurrentPageNum, getNextPageNum, getPageItems, getPagesNum, getPrevPageNum, removePageItem, removePageItem, setPageSize, update, updatePageItem, updatePageItem, updatePageItem, updatePageItem, updateTitleMethods inherited from class dev.triumphteam.gui.guis.BaseGui
addItem, addSlotAction, addSlotAction, allowsOtherActions, canDropItems, canPlaceItems, canSwapItems, canTakeItems, close, close, disableAllInteractions, disableItemDrop, disableItemPlace, disableItemSwap, disableItemTake, disableOtherActions, enableAllInteractions, enableItemDrop, enableItemPlace, enableItemSwap, enableItemTake, enableOtherActions, getFiller, getGuiItem, getGuiItems, getInventory, getRows, getTitle, guiType, isUpdating, removeItem, removeItem, removeItem, removeItem, setCloseGuiAction, setDefaultClickAction, setDefaultTopClickAction, setDragAction, setInventory, setItem, setItem, setItem, setOpenGuiAction, setOutsideClickAction, setPlayerInventoryAction, setUpdating, title, updateItem, updateItem, updateItem, updateItem
-
Constructor Details
-
ScrollingGui
public ScrollingGui(int rows, int pageSize, @NotNull @NotNull String title, @NotNull @NotNull ScrollType scrollType, @NotNull @NotNull Set<InteractionModifier> interactionModifiers) Main constructor of the Scrolling GUI- Parameters:
rows- The rows the GUI should havepageSize- The Page sizetitle- The title usingStringscrollType- TheScrollTypeinteractionModifiers- A set containing theInteractionModifierthis GUI should use- Since:
- 3.0.3
-
ScrollingGui
@Deprecated public ScrollingGui(int rows, int pageSize, @NotNull @NotNull String title, @NotNull @NotNull ScrollType scrollType) Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set)Main constructor of the Scrolling GUI- Parameters:
rows- The rows the GUI should havepageSize- The Page sizetitle- The GUI's titlescrollType- TheScrollType
-
ScrollingGui
Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set)Alternative constructor that doesn't require theScrollType- Parameters:
rows- The rows the GUI should havepageSize- The Page sizetitle- The GUI's title
-
ScrollingGui
Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set)Alternative constructor that doesn't require theScrollTypeor page size- Parameters:
rows- The rows the GUI should havetitle- The GUI's title
-
ScrollingGui
@Deprecated public ScrollingGui(int rows, @NotNull @NotNull String title, @NotNull @NotNull ScrollType scrollType) Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set)Alternative constructor that doesn't require the page size- Parameters:
rows- The rows the GUI should havetitle- The GUI's titlescrollType- TheScrollType
-
ScrollingGui
Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set)Alternative constructor that only requires title- Parameters:
title- The GUI's title
-
ScrollingGui
@Deprecated public ScrollingGui(@NotNull @NotNull String title, @NotNull @NotNull ScrollType scrollType) Deprecated.In favor ofScrollingGui(int, int, String, ScrollType, Set)Alternative constructor that doesn't require the rows or page size- Parameters:
title- The GUI's titlescrollType- TheScrollType
-
-
Method Details
-
next
public boolean next()OverridesPaginatedGui.next()to make it work with the specific scrolls- Overrides:
nextin classPaginatedGui- Returns:
- False if there is no next page.
-
previous
public boolean previous()OverridesPaginatedGui.previous()to make it work with the specific scrolls- Overrides:
previousin classPaginatedGui- Returns:
- False if there is no previous page.
-
open
public void open(@NotNull @NotNull org.bukkit.entity.HumanEntity player) OverridesPaginatedGui.open(HumanEntity)to make it work with the specific scrolls- Overrides:
openin classPaginatedGui- Parameters:
player- TheHumanEntityto open the GUI to
-
open
public void open(@NotNull @NotNull org.bukkit.entity.HumanEntity player, int openPage) OverridesPaginatedGui.open(HumanEntity, int)to make it work with the specific scrolls- Overrides:
openin classPaginatedGui- Parameters:
player- TheHumanEntityto open the GUI toopenPage- The page to open on
-
ScrollingGui(int, int, String, ScrollType, Set)