public class NukkitPlayerInventory extends NukkitInventory
| Constructor and Description |
|---|
NukkitPlayerInventory(PlayerSession session) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearSlot(int slot,
com.nukkitx.protocol.bedrock.data.ContainerId id) |
ItemStack |
getItem(int slot,
com.nukkitx.protocol.bedrock.data.ContainerId id) |
com.nukkitx.protocol.bedrock.data.ContainerId |
getSelectedId() |
ItemStack |
getSelectedItem() |
int |
getSelectedSlot() |
int |
getSize(com.nukkitx.protocol.bedrock.data.ContainerId id) |
void |
selectSlot(int slot,
com.nukkitx.protocol.bedrock.data.ContainerId id) |
void |
setContainerSize(int size,
com.nukkitx.protocol.bedrock.data.ContainerId id) |
void |
setItem(int slot,
ItemStack item,
PlayerSession session,
com.nukkitx.protocol.bedrock.data.ContainerId id) |
void |
setSelectedItem(ItemStack item,
PlayerSession session) |
canAdd, getHotbarSize, getItemCount, getMaxStackSize, getPlayer, getPlayerSession, getSlotByItem, hasResource, isCreative, onClose, onOpen, removeResource, removeResource, swapItemsaddContentListener, addItem, addItem, addItemToFirstEmptySlot, addItemToFirstEmptySlot, addSizeListener, clearItem, clearSlot, clearSlots, close, decreaseSlot, dropContents, getContainerType, getContents, getCustomName, getEmptySlotsCount, getEmptySlotsCount, getFirstEmptySlot, getSize, getSlot, hasCustomName, hasRoomForItem, open, removeContentListener, removeSizeListener, setContainerSize, setCustomName, setItem, setSlotclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanAdd, getItemCount, getItemCount, getPlayer, getSlotByItem, getSlotByItem, hasResource, removeResource, removeResource, removeResource, swapItemsaddItem, addItemToFirstEmptySlot, clearSlot, clearSlots, decreaseSlot, dropContents, getContents, getCustomName, getEmptySlotsCount, getFirstEmptySlot, getSize, getSlot, hasCustomName, hasRoomForItem, setCustomName, setSlotpublic NukkitPlayerInventory(PlayerSession session)
public void setItem(int slot,
ItemStack item,
PlayerSession session,
com.nukkitx.protocol.bedrock.data.ContainerId id)
public ItemStack getItem(int slot, com.nukkitx.protocol.bedrock.data.ContainerId id)
public void clearSlot(int slot,
com.nukkitx.protocol.bedrock.data.ContainerId id)
public void setContainerSize(int size,
com.nukkitx.protocol.bedrock.data.ContainerId id)
public int getSize(com.nukkitx.protocol.bedrock.data.ContainerId id)
public void selectSlot(int slot,
com.nukkitx.protocol.bedrock.data.ContainerId id)
public ItemStack getSelectedItem()
public void setSelectedItem(@Nullable ItemStack item, @Nullable PlayerSession session)
public com.nukkitx.protocol.bedrock.data.ContainerId getSelectedId()
public int getSelectedSlot()
Copyright © 2017–2020 NukkitX. All rights reserved.