Class EasyPaginatedMenu
java.lang.Object
me.fami6xx.rpuniverse.core.menuapi.types.Menu
me.fami6xx.rpuniverse.core.menuapi.types.PaginatedMenu
me.fami6xx.rpuniverse.core.menuapi.types.EasyPaginatedMenu
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder
- Direct Known Subclasses:
AllConsumablesMenu,AllJobsMenu,AllLocksMenu,AllPropertiesMenu,AllWorkingStepsMenu,CreateLockSelectJobMenu,JobAddPlayerMenu,JobAllPlayersMenu,JobAllPositionsMenu,JobPlayerPositionMenu,JobSelectJobType,LanguageEditorMainMenu,PossibleDropsEditorMenu,PropertyAllLocksMenu,SellStepsMenu,TrustedPlayersMenu,WorkingLocationsMenu,WorkingStepNeededItemsMenu
-
Field Summary
Fields inherited from class me.fami6xx.rpuniverse.core.menuapi.types.PaginatedMenu
BORDER_GLASS, index, maxItemsPerPage, pageFields inherited from class me.fami6xx.rpuniverse.core.menuapi.types.Menu
FILLER_GLASS, inventory, playerMenu -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidA method where you can add your own items to the inventory border for example.abstract intabstract org.bukkit.inventory.ItemStackgetItemFromIndex(int index)Gets ItemStack you created from your collectionintgetSlotIndex(int slot)Maps the clicked slot to the index in the list.voidhandleMenu(org.bukkit.event.inventory.InventoryClickEvent e)abstract voidhandlePaginatedMenu(org.bukkit.event.inventory.InventoryClickEvent e)Handles click on your itemvoidMethods inherited from class me.fami6xx.rpuniverse.core.menuapi.types.PaginatedMenu
addMenuBorder, getMaxItemsPerPage, getSlotsMethods inherited from class me.fami6xx.rpuniverse.core.menuapi.types.Menu
getInventory, getMenuName, getMenuTags, makeColoredGlass, open, setFillerGlass
-
Constructor Details
-
Method Details
-
getItemFromIndex
public abstract org.bukkit.inventory.ItemStack getItemFromIndex(int index)Gets ItemStack you created from your collection- Parameters:
index- Index of item you want to get from collection- Returns:
- ItemStack you create
-
getCollectionSize
public abstract int getCollectionSize()- Returns:
- Size of collection you use
-
handlePaginatedMenu
public abstract void handlePaginatedMenu(org.bukkit.event.inventory.InventoryClickEvent e)Handles click on your item- Parameters:
e- Previously handled InventoryClickEvent
-
handleMenu
public void handleMenu(org.bukkit.event.inventory.InventoryClickEvent e)- Specified by:
handleMenuin classMenu
-
setMenuItems
public void setMenuItems()- Specified by:
setMenuItemsin classMenu
-
addAdditionalItems
public abstract void addAdditionalItems()A method where you can add your own items to the inventory border for example. -
getSlotIndex
public int getSlotIndex(int slot)Maps the clicked slot to the index in the list.- Parameters:
slot- The inventory slot that was clicked.- Returns:
- The corresponding index in the list, or -1 if the slot doesn't correspond to an item.
-