Klasse Menu

java.lang.Object
de.delinkedde.mobarenareborn.gui.Menu
Bekannte direkte Unterklassen:
ClassSelectionMenu

public abstract class Menu extends Object
A simple chest-inventory menu with per-slot click actions.

Subclasses populate the menu in their constructor with setItem(int, ItemStack, Consumer). The MenuManager opens menus, cancels their clicks (so items cannot be taken) and dispatches clicks to the registered actions.

  • Konstruktordetails

    • Menu

      protected Menu(@NotNull @NotNull net.kyori.adventure.text.Component title, int rows)
      Parameter:
      title - the menu title
      rows - the number of rows (1-6)
  • Methodendetails

    • setItem

      protected void setItem(int slot, @NotNull @NotNull ItemStack item, @Nullable @Nullable Consumer<Player> action)
      Places an item and, optionally, a click action.
      Parameter:
      slot - the slot index
      item - the item to display
      action - the action to run when the slot is clicked, or null