Package eu.mhsl.minenet.minigames.shared.inventory

# Class InteractableInventory

java.lang.Object
net.minestom.server.inventory.AbstractInventory
net.minestom.server.inventory.Inventory
eu.mhsl.minenet.minigames.shared.inventory.InteractableInventory

All Implemented Interfaces:
  `net.minestom.server.inventory.InventoryClickHandler`, `net.minestom.server.tag.Taggable`, `net.minestom.server.tag.TagReadable`, `net.minestom.server.tag.TagWritable`, `net.minestom.server.Viewable`

Direct Known Subclasses:
  `GameConfigurationInventory`, `HubInventory`, `JoinInventory`, `MinigameTypeSelectInventory`

public class InteractableInventory extends net.minestom.server.inventory.Inventory

- ## Field Summary

  ### Fields inherited from class net.minestom.server.inventory.AbstractInventory

  `clickProcessor, inventoryConditions, itemStacks`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `InteractableInventory(@NotNull net.minestom.server.inventory.InventoryType inventoryType, @NotNull net.kyori.adventure.text.Component title)`
  Defines an Inventory with direct callbacks for ItemSlots

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `onClick(net.minestom.server.entity.Player player, int slot, net.minestom.server.inventory.click.ClickType clickType, net.minestom.server.inventory.condition.InventoryConditionResult inventoryConditionResult)`
  You may want to Override this method to get more generic click events
  `protected void`
  `setClickableItem(net.minestom.server.item.ItemStack item, int slot, Consumer<ItemClick> callback)`
  `protected void`
  `setClickableItem(net.minestom.server.item.ItemStack item, int slot, Consumer<ItemClick> callback, boolean closeAfter)`
  Set Item with Callback
  `protected void`
  `setDummyItem(net.minestom.server.item.ItemStack item, int slot)`
  Set Item without handler
  `protected void`
  `setDummyItem(net.minestom.server.item.Material material, int slot)`

  ### Methods inherited from class net.minestom.server.inventory.Inventory

  `addViewer, changeHeld, clear, doubleClick, dragging, drop, getCursorItem, getInventoryType, getTitle, getViewers, getWindowId, leftClick, middleClick, removeViewer, rightClick, sendProperty, setCursorItem, setTitle, shiftClick, UNSAFE_itemInsert, update, update`

  ### Methods inherited from class net.minestom.server.inventory.AbstractInventory

  `addInventoryCondition, addItemStack, addItemStack, addItemStacks, copyContents, getInnerSize, getInventoryConditions, getItemStack, getItemStacks, getSize, processItemStack, processItemStacks, replaceItemStack, safeItemInsert, safeItemInsert, setItemStack, tagHandler, takeItemStack, takeItemStacks`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface net.minestom.server.inventory.InventoryClickHandler

  `callClickEvent`

  ### Methods inherited from interface net.minestom.server.tag.Taggable

  `getTag, hasTag, removeTag, setTag`

  ### Methods inherited from interface net.minestom.server.Viewable

  `getViewersAsAudience, getViewersAsAudiences, isViewer, sendPacketsToViewers, sendPacketsToViewers, sendPacketToViewers, sendPacketToViewersAndSelf`

- ## Constructor Details

  - ### InteractableInventory

    protected InteractableInventory(@NotNull @NotNull net.minestom.server.inventory.InventoryType inventoryType, @NotNull @NotNull net.kyori.adventure.text.Component title)
    Defines an Inventory with direct callbacks for ItemSlots
    Parameters:
      `inventoryType` -
      `title` -

- ## Method Details

  - ### setClickableItem

    protected void setClickableItem(net.minestom.server.item.ItemStack item, int slot, Consumer<ItemClick> callback, boolean closeAfter)
    Set Item with Callback
    Parameters:
      `item` -
      `slot` -
      `callback` -

  - ### setClickableItem

    protected void setClickableItem(net.minestom.server.item.ItemStack item, int slot, Consumer<ItemClick> callback)

  - ### setDummyItem

    protected void setDummyItem(net.minestom.server.item.ItemStack item, int slot)
    Set Item without handler
    Parameters:
      `item` -
      `slot` -

  - ### setDummyItem

    protected void setDummyItem(net.minestom.server.item.Material material, int slot)

  - ### onClick

    protected void onClick(net.minestom.server.entity.Player player, int slot, net.minestom.server.inventory.click.ClickType clickType, net.minestom.server.inventory.condition.InventoryConditionResult inventoryConditionResult)
    You may want to Override this method to get more generic click events
    Parameters:
      `player` -
      `slot` -
      `clickType` -
      `inventoryConditionResult` -