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
-
Field Summary
Fields inherited from class org.cloudburstmc.server.inventory.BaseInventory
holder, maxStackSize, name, size, slots, title, type, viewersFields inherited from interface org.cloudburstmc.api.inventory.Inventory
MAX_STACK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetArmorItem(int index)int@NonNull org.cloudburstmc.api.item.ItemStackintgetSize()voidvoidonSlotChange(int index, org.cloudburstmc.api.item.ItemStack before, boolean send)voidsaveInventory(com.nukkitx.nbt.NbtMapBuilder tag)voidsendArmorContents(Collection<CloudPlayer> players)voidsendArmorContents(CloudPlayer player)voidsendArmorContents(CloudPlayer[] players)voidsendArmorSlot(int index, Collection<CloudPlayer> players)voidsendArmorSlot(int index, CloudPlayer player)voidsendArmorSlot(int index, CloudPlayer[] players)voidsendHeldItem(Collection<CloudPlayer> players)voidsendHeldItem(CloudPlayer... players)voidsendOffHandContents(Collection<CloudPlayer> players)voidsendOffHandContents(CloudPlayer player)voidsendOffHandContents(CloudPlayer[] players)voidsendOffHandSlot(Collection<CloudPlayer> players)voidsendOffHandSlot(CloudPlayer player)voidsendOffHandSlot(CloudPlayer[] players)voidsetArmorContents(org.cloudburstmc.api.item.ItemStack[] items)booleansetArmorItem(int index, org.cloudburstmc.api.item.ItemStack item, boolean ignoreArmorEvents)voidsetHeldItemIndex(int index)booleansetItemInHand(org.cloudburstmc.api.item.ItemStack item)voidsetOffHandItem(org.cloudburstmc.api.item.ItemStack offhand)voidsetSize(int size)Methods inherited from class org.cloudburstmc.server.inventory.BaseInventory
addItem, addItemToFirstEmptySlot, all, canAddItem, clear, clearAll, close, contains, decrementCount, first, firstEmpty, firstFit, firstNonEmpty, getContents, getEmptySlotsCount, getFreeSpace, getItem, getMaxStackSize, getName, getTitle, getType, getViewers, incrementCount, isEmpty, isFull, onClose, onOpen, open, remove, removeItem, sendContents, sendSlot, setContents, setItem, setMaxStackSizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cloudburstmc.api.inventory.CreatureInventory
getBoots, getChestplate, getHelmet, getLeggings, setArmorItem, setBoots, setChestplate, setHelmet, setLeggingsMethods inherited from interface org.cloudburstmc.api.inventory.Inventory
addItem, all, canAddItem, clear, clear, clearAll, close, contains, decrementCount, first, first, firstEmpty, firstFit, firstFit, firstNonEmpty, getContents, getFreeSpace, getItem, getMaxStackSize, getName, getTitle, getType, getViewers, incrementCount, isEmpty, isFull, onClose, onOpen, open, remove, removeItem, sendContents, sendContents, sendContents, sendSlot, sendSlot, sendSlot, setContents, setItem, setItem, setMaxStackSize
-
Constructor Details
-
CloudCreatureInventory
-
-
Method Details
-
getHolder
- Specified by:
getHolderin interfaceorg.cloudburstmc.api.inventory.CreatureInventory- Specified by:
getHolderin interfaceorg.cloudburstmc.api.inventory.Inventory- Overrides:
getHolderin classBaseInventory
-
getSize
public int getSize()- Specified by:
getSizein interfaceorg.cloudburstmc.api.inventory.Inventory- Overrides:
getSizein classBaseInventory
-
setSize
public void setSize(int size)- Overrides:
setSizein classBaseInventory
-
getHeldItemIndex
public int getHeldItemIndex()- Specified by:
getHeldItemIndexin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
setHeldItemIndex
public void setHeldItemIndex(int index)- Specified by:
setHeldItemIndexin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
decrementHandCount
public void decrementHandCount()- Specified by:
decrementHandCountin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
incrementHandCount
public void incrementHandCount()- Specified by:
incrementHandCountin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
getItemInHand
- Specified by:
getItemInHandin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
setItemInHand
public boolean setItemInHand(org.cloudburstmc.api.item.ItemStack item)- Specified by:
setItemInHandin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
sendHeldItem
-
sendHeldItem
-
getArmorItem
- Specified by:
getArmorItemin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
setArmorItem
public boolean setArmorItem(int index, org.cloudburstmc.api.item.ItemStack item, boolean ignoreArmorEvents)- Specified by:
setArmorItemin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
getArmorContents
- Specified by:
getArmorContentsin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
getOffHandItem
public @NonNull org.cloudburstmc.api.item.ItemStack getOffHandItem()- Specified by:
getOffHandItemin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
setOffHandItem
public void setOffHandItem(org.cloudburstmc.api.item.ItemStack offhand)- Specified by:
setOffHandItemin interfaceorg.cloudburstmc.api.inventory.CreatureInventory
-
sendOffHandContents
-
sendOffHandContents
-
sendOffHandContents
-
sendOffHandSlot
-
sendOffHandSlot
-
sendOffHandSlot
-
sendArmorContents
-
sendArmorContents
-
setArmorContents
public void setArmorContents(org.cloudburstmc.api.item.ItemStack[] items) -
sendArmorContents
-
sendArmorSlot
-
sendArmorSlot
-
sendArmorSlot
-
saveInventory
public void saveInventory(com.nukkitx.nbt.NbtMapBuilder tag)- Overrides:
saveInventoryin classBaseInventory
-
onSlotChange
public void onSlotChange(int index, org.cloudburstmc.api.item.ItemStack before, boolean send)- Specified by:
onSlotChangein interfaceorg.cloudburstmc.api.inventory.Inventory- Overrides:
onSlotChangein classBaseInventory
-