public class CloudPlayerInventory extends CloudCreatureInventory implements org.cloudburstmc.api.inventory.PlayerInventory
| Modifier and Type | Field and Description |
|---|---|
static int |
SURVIVAL_SLOTS |
holder, maxStackSize, name, size, slots, title, type, viewers| Constructor and Description |
|---|
CloudPlayerInventory(CloudPlayer player) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
clear(int index,
boolean send) |
void |
clearAll() |
void |
clearCursor() |
boolean |
equipItem(int slot)
Called when a client equips a hotbar inventorySlot.
|
CloudCraftingGrid |
getCraftingGrid() |
org.cloudburstmc.api.item.ItemStack |
getCursorItem() |
CloudPlayer |
getHolder() |
List<CloudItemStack> |
getHotbar() |
int |
getHotbarSize() |
CloudItemStack |
getHotbarSlot(int slot) |
void |
onClose(org.cloudburstmc.api.player.Player who) |
void |
onOpen(org.cloudburstmc.api.player.Player who) |
void |
onSlotChange(int index,
org.cloudburstmc.api.item.ItemStack before,
boolean send) |
void |
sendContents(org.cloudburstmc.api.player.Player[] players) |
void |
sendCreativeContents() |
void |
sendSlot(int index,
org.cloudburstmc.api.player.Player... players) |
boolean |
setCursorItem(org.cloudburstmc.api.item.ItemStack item) |
void |
setHeldItemIndex(int index) |
void |
setHeldItemIndex(int index,
boolean send) |
void |
setHeldItemSlot(int slot) |
boolean |
setHotbarSlot(int slot,
org.cloudburstmc.api.item.ItemStack item) |
boolean |
setItem(int index,
org.cloudburstmc.api.item.ItemStack item) |
decrementHandCount, getArmorContents, getArmorItem, getHeldItemIndex, getItemInHand, getOffHand, getOffHandIndex, getSize, incrementHandCount, sendArmorContents, sendArmorContents, sendArmorContents, sendArmorSlot, sendArmorSlot, sendArmorSlot, sendHeldItem, sendHeldItem, sendOffHandContents, sendOffHandContents, sendOffHandContents, sendOffHandSlot, sendOffHandSlot, sendOffHandSlot, setArmorContents, setArmorItem, setItemInHand, setOffHandContents, setSizeaddItem, addItemToFirstEmptySlot, all, canAddItem, close, contains, decrementCount, first, firstEmpty, firstFit, firstNonEmpty, getContents, getEmptySlotsCount, getFreeSpace, getItem, getMaxStackSize, getName, getTitle, getType, getViewers, incrementCount, isEmpty, isFull, open, remove, removeItem, setContents, setItem, setMaxStackSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecrementHandCount, getArmorContents, getArmorItem, getBoots, getChestplate, getHeldItemIndex, getHelmet, getItemInHand, getLeggings, getOffHand, incrementHandCount, setArmorItem, setArmorItem, setBoots, setChestplate, setHelmet, setItemInHand, setLeggings, setOffHandContentsaddItem, all, canAddItem, clear, close, contains, decrementCount, first, first, firstEmpty, firstFit, firstFit, firstNonEmpty, getContents, getFreeSpace, getItem, getMaxStackSize, getName, getSize, getTitle, getType, getViewers, incrementCount, isEmpty, isFull, open, remove, removeItem, sendContents, sendContents, sendSlot, sendSlot, setContents, setItem, setMaxStackSizepublic static final int SURVIVAL_SLOTS
public CloudPlayerInventory(CloudPlayer player)
public boolean equipItem(int slot)
slot - hotbar slot Number of the hotbar slot to equip.public boolean setHotbarSlot(int slot,
org.cloudburstmc.api.item.ItemStack item)
setHotbarSlot in interface org.cloudburstmc.api.inventory.PlayerInventorypublic CloudItemStack getHotbarSlot(int slot)
getHotbarSlot in interface org.cloudburstmc.api.inventory.PlayerInventorypublic List<CloudItemStack> getHotbar()
getHotbar in interface org.cloudburstmc.api.inventory.PlayerInventory@Nonnull public org.cloudburstmc.api.item.ItemStack getCursorItem()
getCursorItem in interface org.cloudburstmc.api.inventory.PlayerInventorypublic boolean setCursorItem(@Nonnull org.cloudburstmc.api.item.ItemStack item)
setCursorItem in interface org.cloudburstmc.api.inventory.PlayerInventorypublic void clearCursor()
clearCursor in interface org.cloudburstmc.api.inventory.PlayerInventorypublic void setHeldItemIndex(int index)
setHeldItemIndex in interface org.cloudburstmc.api.inventory.CreatureInventorysetHeldItemIndex in class CloudCreatureInventorypublic void setHeldItemIndex(int index,
boolean send)
setHeldItemIndex in interface org.cloudburstmc.api.inventory.PlayerInventorypublic void setHeldItemSlot(int slot)
public void onSlotChange(int index,
org.cloudburstmc.api.item.ItemStack before,
boolean send)
onSlotChange in interface org.cloudburstmc.api.inventory.InventoryonSlotChange in class BaseInventorypublic int getHotbarSize()
public boolean setItem(int index,
org.cloudburstmc.api.item.ItemStack item)
setItem in interface org.cloudburstmc.api.inventory.Inventorypublic boolean clear(int index,
boolean send)
clear in interface org.cloudburstmc.api.inventory.Inventoryclear in class BaseInventorypublic void clearAll()
clearAll in interface org.cloudburstmc.api.inventory.InventoryclearAll in class BaseInventorypublic void sendContents(org.cloudburstmc.api.player.Player[] players)
sendContents in interface org.cloudburstmc.api.inventory.InventorysendContents in class BaseInventorypublic void sendSlot(int index,
org.cloudburstmc.api.player.Player... players)
sendSlot in interface org.cloudburstmc.api.inventory.InventorysendSlot in class BaseInventorypublic void sendCreativeContents()
sendCreativeContents in interface org.cloudburstmc.api.inventory.PlayerInventorypublic CloudPlayer getHolder()
getHolder in interface org.cloudburstmc.api.inventory.CreatureInventorygetHolder in interface org.cloudburstmc.api.inventory.InventorygetHolder in interface org.cloudburstmc.api.inventory.PlayerInventorygetHolder in class CloudCreatureInventorypublic void onOpen(org.cloudburstmc.api.player.Player who)
onOpen in interface org.cloudburstmc.api.inventory.InventoryonOpen in class BaseInventorypublic void onClose(org.cloudburstmc.api.player.Player who)
onClose in interface org.cloudburstmc.api.inventory.InventoryonClose in class BaseInventorypublic CloudCraftingGrid getCraftingGrid()
getCraftingGrid in interface org.cloudburstmc.api.inventory.PlayerInventoryCopyright © 2021. All rights reserved.