@ParametersAreNullableByDefault public class NukkitFillingContainer extends NukkitContainer implements FillingContainer
| Constructor and Description |
|---|
NukkitFillingContainer(PlayerSession session,
int size,
ContainerType type) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAdd(ItemStack item) |
int |
getHotbarSize() |
int |
getItemCount(ItemType type,
Metadata metadata) |
int |
getMaxStackSize() |
Optional<Player> |
getPlayer() |
PlayerSession |
getPlayerSession() |
OptionalInt |
getSlotByItem(ItemStack item,
boolean checkMetadata,
boolean checkUserData) |
boolean |
hasResource(ItemType type) |
protected boolean |
isCreative() |
void |
onClose(PlayerSession session) |
void |
onOpen(PlayerSession session) |
int |
removeResource(ItemStack item,
boolean checkMetadata,
boolean checkUserdata,
int amount) |
boolean |
removeResource(ItemType type) |
void |
swapItems(int slot1,
int slot2) |
addContentListener, 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, waitgetItemCount, getSlotByItem, removeResourceaddItem, addItemToFirstEmptySlot, clearSlot, clearSlots, decreaseSlot, dropContents, getContents, getCustomName, getEmptySlotsCount, getFirstEmptySlot, getSize, getSlot, hasCustomName, hasRoomForItem, setCustomName, setSlotpublic NukkitFillingContainer(@Nullable PlayerSession session, int size, ContainerType type)
public void swapItems(int slot1,
int slot2)
swapItems in interface FillingContainerpublic Optional<Player> getPlayer()
getPlayer in interface FillingContainerpublic PlayerSession getPlayerSession()
protected boolean isCreative()
public boolean canAdd(ItemStack item)
canAdd in interface FillingContainerpublic OptionalInt getSlotByItem(ItemStack item, boolean checkMetadata, boolean checkUserData)
getSlotByItem in interface FillingContainerpublic int getItemCount(@Nonnull ItemType type, Metadata metadata)
getItemCount in interface FillingContainerpublic boolean hasResource(@Nonnull ItemType type)
hasResource in interface FillingContainerpublic boolean removeResource(@Nonnull ItemType type)
removeResource in interface FillingContainerpublic int removeResource(ItemStack item, boolean checkMetadata, boolean checkUserdata, int amount)
removeResource in interface FillingContainerpublic int getMaxStackSize()
getMaxStackSize in class NukkitContainerpublic void onOpen(@Nonnull PlayerSession session)
onOpen in class NukkitContainerpublic void onClose(@Nonnull PlayerSession session)
onClose in class NukkitContainerpublic int getHotbarSize()
Copyright © 2017–2019 NukkitX. All rights reserved.