Class InventoryCache

java.lang.Object
com.zenith.cache.data.inventory.InventoryCache

public class InventoryCache extends Object
  • Constructor Details

    • InventoryCache

      public InventoryCache()
  • Method Details

    • getPlayerInventory

      public Container getPlayerInventory()
    • getOpenContainer

      public Container getOpenContainer()
    • setInventory

      public void setInventory(int containerId, ItemStack[] inventory)
    • setItemStack

      public void setItemStack(int containerId, int slot, ItemStack newItemStack)
    • closeContainer

      public void closeContainer(int containerId)
    • openContainer

      public void openContainer(int containerId, ContainerType type, net.kyori.adventure.text.Component title)
    • handleContainerClick

      public void handleContainerClick(ServerboundContainerClickPacket packet)
    • reset

      public void reset()
    • getContainers

      public it.unimi.dsi.fastutil.ints.Int2ObjectMap<Container> getContainers()
    • getOpenContainerId

      public int getOpenContainerId()
    • getActiveContainerId

      public int getActiveContainerId()
    • getContainerOpenedAt

      public long getContainerOpenedAt()
    • getLastContainerClick

      public long getLastContainerClick()
    • getMouseStack

      public @Nullable ItemStack getMouseStack()
    • setActiveContainerId

      public InventoryCache setActiveContainerId(int activeContainerId)
      Returns:
      this.
    • setContainerOpenedAt

      public InventoryCache setContainerOpenedAt(long containerOpenedAt)
      Returns:
      this.
    • setLastContainerClick

      public InventoryCache setLastContainerClick(long lastContainerClick)
      Returns:
      this.
    • setMouseStack

      public InventoryCache setMouseStack(@Nullable ItemStack mouseStack)
      Returns:
      this.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object