Package com.kamikazejam.kamicommon.menu
Interface Menu<M extends Menu<M>>
- All Known Implementing Classes:
AbstractMenu
,OneClickMenu
,PaginatedMenu
,SimpleMenu
public interface Menu<M extends Menu<M>>
Represents the abstraction of a menu into the core parts that
This interface is not meant for public consumption or use, you will find none of the helpful methods you would expect.
Use specific menus classes like
MenuManager
needs to interact with.This interface is not meant for public consumption or use, you will find none of the helpful methods you would expect.
Use specific menus classes like
SimpleMenu
or PaginatedMenu
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull MenuClickData
<M> buildClickData
(M menu, @NotNull Player player, @NotNull ClickType clickType, @NotNull InventoryClickEvent event, int page, @NotNull MenuIcon<M> icon, int iconSlot) default @NotNull PlayerClickData
<M> buildPlayerClickData
(M menu, @NotNull Player player, @NotNull ClickType clickType, @NotNull InventoryClickEvent event, int slot) @NotNull MenuEvents
<M> @NotNull IMenuIconsAccess
<M> @NotNull MenuSize
@NotNull MenuOptions
<M> void
Attempt to reopen the menu for the given player.void
reopenMenu
(boolean resetTickCounter) Attempt to reopen the menu for the given player.
-
Method Details
-
getEvents
-
getOptions
-
getMenuSize
-
getMenuIcons
-
getMenuIconsAccess
-
getFillerIcon
-
reopenMenu
void reopenMenu()Attempt to reopen the menu for the given player. Depending on the menu type, this may not be possible for all possible
By default, this method will NOT reset the tick counter.
SeereopenMenu(boolean)
for reopening with reset. -
reopenMenu
void reopenMenu(boolean resetTickCounter) Attempt to reopen the menu for the given player. Depending on the menu type, this may not be possible for all possible- Parameters:
resetTickCounter
- If true, the tick counter will be reset to 0. This is useful for menus that are not paginated, and
-
buildPlayerClickData
@Internal @NotNull default @NotNull PlayerClickData<M> buildPlayerClickData(@NotNull M menu, @NotNull @NotNull Player player, @NotNull @NotNull ClickType clickType, @NotNull @NotNull InventoryClickEvent event, int slot)
-