Class 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

public abstract class EasyPaginatedMenu extends PaginatedMenu
  • Constructor Details

    • EasyPaginatedMenu

      public EasyPaginatedMenu(PlayerMenu menu)
  • 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:
      handleMenu in class Menu
    • setMenuItems

      public void setMenuItems()
      Specified by:
      setMenuItems in class Menu
    • 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.