Class CloudCreatureInventory

java.lang.Object
org.cloudburstmc.server.inventory.BaseInventory
org.cloudburstmc.server.inventory.CloudCreatureInventory
All Implemented Interfaces:
org.cloudburstmc.api.inventory.CreatureInventory, org.cloudburstmc.api.inventory.Inventory
Direct Known Subclasses:
CloudPlayerInventory

public class CloudCreatureInventory extends BaseInventory implements org.cloudburstmc.api.inventory.CreatureInventory
  • Constructor Details

    • CloudCreatureInventory

      public CloudCreatureInventory(EntityCreature entity)
  • Method Details

    • getHolder

      public EntityCreature getHolder()
      Specified by:
      getHolder in interface org.cloudburstmc.api.inventory.CreatureInventory
      Specified by:
      getHolder in interface org.cloudburstmc.api.inventory.Inventory
      Overrides:
      getHolder in class BaseInventory
    • getSize

      public int getSize()
      Specified by:
      getSize in interface org.cloudburstmc.api.inventory.Inventory
      Overrides:
      getSize in class BaseInventory
    • setSize

      public void setSize(int size)
      Overrides:
      setSize in class BaseInventory
    • getHeldItemIndex

      public int getHeldItemIndex()
      Specified by:
      getHeldItemIndex in interface org.cloudburstmc.api.inventory.CreatureInventory
    • setHeldItemIndex

      public void setHeldItemIndex(int index)
      Specified by:
      setHeldItemIndex in interface org.cloudburstmc.api.inventory.CreatureInventory
    • decrementHandCount

      public void decrementHandCount()
      Specified by:
      decrementHandCount in interface org.cloudburstmc.api.inventory.CreatureInventory
    • incrementHandCount

      public void incrementHandCount()
      Specified by:
      incrementHandCount in interface org.cloudburstmc.api.inventory.CreatureInventory
    • getItemInHand

      public CloudItemStack getItemInHand()
      Specified by:
      getItemInHand in interface org.cloudburstmc.api.inventory.CreatureInventory
    • setItemInHand

      public boolean setItemInHand(org.cloudburstmc.api.item.ItemStack item)
      Specified by:
      setItemInHand in interface org.cloudburstmc.api.inventory.CreatureInventory
    • sendHeldItem

      public void sendHeldItem(Collection<CloudPlayer> players)
    • sendHeldItem

      public void sendHeldItem(CloudPlayer... players)
    • getArmorItem

      public CloudItemStack getArmorItem(int index)
      Specified by:
      getArmorItem in interface org.cloudburstmc.api.inventory.CreatureInventory
    • setArmorItem

      public boolean setArmorItem(int index, org.cloudburstmc.api.item.ItemStack item, boolean ignoreArmorEvents)
      Specified by:
      setArmorItem in interface org.cloudburstmc.api.inventory.CreatureInventory
    • getArmorContents

      public Set<CloudItemStack> getArmorContents()
      Specified by:
      getArmorContents in interface org.cloudburstmc.api.inventory.CreatureInventory
    • getOffHandItem

      public @NonNull org.cloudburstmc.api.item.ItemStack getOffHandItem()
      Specified by:
      getOffHandItem in interface org.cloudburstmc.api.inventory.CreatureInventory
    • setOffHandItem

      public void setOffHandItem(org.cloudburstmc.api.item.ItemStack offhand)
      Specified by:
      setOffHandItem in interface org.cloudburstmc.api.inventory.CreatureInventory
    • sendOffHandContents

      public void sendOffHandContents(Collection<CloudPlayer> players)
    • sendOffHandContents

      public void sendOffHandContents(CloudPlayer player)
    • sendOffHandContents

      public void sendOffHandContents(CloudPlayer[] players)
    • sendOffHandSlot

      public void sendOffHandSlot(CloudPlayer player)
    • sendOffHandSlot

      public void sendOffHandSlot(Collection<CloudPlayer> players)
    • sendOffHandSlot

      public void sendOffHandSlot(CloudPlayer[] players)
    • sendArmorContents

      public void sendArmorContents(CloudPlayer player)
    • sendArmorContents

      public void sendArmorContents(CloudPlayer[] players)
    • setArmorContents

      public void setArmorContents(org.cloudburstmc.api.item.ItemStack[] items)
    • sendArmorContents

      public void sendArmorContents(Collection<CloudPlayer> players)
    • sendArmorSlot

      public void sendArmorSlot(int index, CloudPlayer player)
    • sendArmorSlot

      public void sendArmorSlot(int index, CloudPlayer[] players)
    • sendArmorSlot

      public void sendArmorSlot(int index, Collection<CloudPlayer> players)
    • saveInventory

      public void saveInventory(com.nukkitx.nbt.NbtMapBuilder tag)
      Overrides:
      saveInventory in class BaseInventory
    • onSlotChange

      public void onSlotChange(int index, org.cloudburstmc.api.item.ItemStack before, boolean send)
      Specified by:
      onSlotChange in interface org.cloudburstmc.api.inventory.Inventory
      Overrides:
      onSlotChange in class BaseInventory