Class OneClickMenu

All Implemented Interfaces:
UpdatingMenu, Menu<OneClickMenu>, InventoryHolder

public final class OneClickMenu extends AbstractMenu<OneClickMenu>
This Menu class focuses on providing a simple menu that allows for only one single click per opening. Subsequent clicks will not trigger click callbacks on icons, unless the menu is reopened.
  • Method Details

    • open

      @Nullable public @Nullable InventoryView open()
      Description copied from class: AbstractMenu
      Open the Inventory for the Player that this menu was created for.
      Overrides:
      open in class AbstractMenu<OneClickMenu>
      Returns:
      The InventoryView for the new menu, or null if the player was not online to open the menu for.
    • countsForClick

      @Contract("null, _ -> false") public boolean countsForClick(@Nullable @Nullable MenuIcon<?> icon, int slot)