Class DelegatingInventory

java.lang.Object
net.minestom.server.inventory.AbstractInventory
net.minestom.server.inventory.Inventory
me.hsgamer.hscore.minestom.gui.inventory.DelegatingInventory
All Implemented Interfaces:
Initializable, net.minestom.server.inventory.InventoryClickHandler, net.minestom.server.tag.Taggable, net.minestom.server.tag.TagReadable, net.minestom.server.tag.TagWritable, net.minestom.server.Viewable

public class DelegatingInventory extends net.minestom.server.inventory.Inventory implements Initializable
A custom inventory used by MinestomGUIDisplay
  • Field Summary

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

    clickProcessor, inventoryConditions, itemStacks
  • Constructor Summary

    Constructors
    Constructor
    Description
    DelegatingInventory(@NotNull net.minestom.server.inventory.InventoryType inventoryType, @NotNull net.kyori.adventure.text.Component title, @NotNull MinestomGUIDisplay display)
    Create a new inventory
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the display related to this inventory
    net.minestom.server.event.EventNode<net.minestom.server.event.trait.InventoryEvent>
    Get the event node related to this inventory
    void
    Initialize some properties for the object
    void
    Stop the object

    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

    • DelegatingInventory

      public DelegatingInventory(@NotNull @NotNull net.minestom.server.inventory.InventoryType inventoryType, @NotNull @NotNull net.kyori.adventure.text.Component title, @NotNull @NotNull MinestomGUIDisplay display)
      Create a new inventory
      Parameters:
      inventoryType - the inventory type
      title - the title
      display - the display
  • Method Details

    • init

      public void init()
      Description copied from interface: Initializable
      Initialize some properties for the object
      Specified by:
      init in interface Initializable
    • stop

      public void stop()
      Description copied from interface: Initializable
      Stop the object
      Specified by:
      stop in interface Initializable
    • getEventNode

      public net.minestom.server.event.EventNode<net.minestom.server.event.trait.InventoryEvent> getEventNode()
      Get the event node related to this inventory
      Returns:
      the event node
    • getDisplay

      public MinestomGUIDisplay getDisplay()
      Get the display related to this inventory
      Returns:
      the display