Package com.kamikazejam.kamicommon.menu
Class PaginatedMenu
java.lang.Object
com.kamikazejam.kamicommon.menu.api.MenuHolder
com.kamikazejam.kamicommon.menu.AbstractMenu<PaginatedMenu>
com.kamikazejam.kamicommon.menu.PaginatedMenu
- All Implemented Interfaces:
UpdatingMenu,Menu<PaginatedMenu>,InventoryHolder
This Menu class focuses on providing an easy way of creating a menu with multiple pages. This menu allows you to
provide all the items you want to display, and it will automatically paginate them for you.
Pagination configuration is available by creating your own
Pagination configuration is available by creating your own
PaginationLayout or by modifying a pre-built one.-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.kamikazejam.kamicommon.menu.AbstractMenu
events, menuIcons, options, playerFields inherited from class com.kamikazejam.kamicommon.menu.api.MenuHolder
inventory, size, title -
Method Summary
Modifier and TypeMethodDescriptionint@NotNull PaginatedMenuOptions@NotNull PaginatedMenumodifyPageIcons(@NotNull Consumer<IPageIconsAccess<PaginatedMenu>> consumer) @Nullable InventoryViewopen()@Nullable InventoryViewopen(int p) protected voidMethods inherited from class com.kamikazejam.kamicommon.menu.AbstractMenu
close, getFillerIcon, getMenuIcons, getMenuIconsAccess, modifyIcons, open, placeIcons, reopenMenu, reopenMenu, resizeMenu, setSize, updateOneTickMethods inherited from class com.kamikazejam.kamicommon.menu.api.MenuHolder
clear, closeAll, deleteInventory, equals, firstEmpty, firstEmpty, firstEmpty, getHolder, getInventory, getItem, getMenuSize, getRawInventory, getSize, getViewers, hashCode, replaceTitle, setItem, setItemMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kamikazejam.kamicommon.menu.Menu
buildClickData, buildPlayerClickData, getEvents, getMenuSizeMethods inherited from interface com.kamikazejam.kamicommon.menu.api.icons.interfaces.UpdatingMenu
getInventory
-
Method Details
-
getOptions
-
open
Description copied from class:AbstractMenu- Overrides:
openin classAbstractMenu<PaginatedMenu>- Returns:
- The
InventoryViewfor the new menu, or null if the player was not online to open the menu for.
-
open
- Parameters:
p- The page index to open (0-indexed)
-
placeFiller
protected void placeFiller(Map<Integer, @Nullable ItemStack> newMenuState, Set<Integer> slots, int tick) - Overrides:
placeFillerin classAbstractMenu<PaginatedMenu>
-
getCurrentPage
public int getCurrentPage()- Returns:
- The current page (0-indexed)
-
modifyPageIcons
@NotNull public @NotNull PaginatedMenu modifyPageIcons(@NotNull @NotNull Consumer<IPageIconsAccess<PaginatedMenu>> consumer)
-