- All Known Subinterfaces:
public interface ViewableInventory extends Inventory
Interface for inventories which may be interacted with by Players.
Nested Class SummaryModifier and TypeInterfaceDescription
static interfaceA builder for inventories conforming to a ContainerType
Method SummaryModifier and TypeMethodDescription
asMenu()Create a new
InventoryMenubased on this ViewableInventory which allows for lightweight callbacks on inventory clicks and changes.
booleanChecks for whether this Inventory currently has viewers.
Methods inherited from interface org.spongepowered.api.item.inventory.Inventory
asViewable, canFit, capacity, children, clear, contains, contains, containsAny, containsChild, containsInventory, freeCapacity, get, get, hasChildren, intersect, offer, offer, parent, peek, peekAt, poll, poll, pollFrom, pollFrom, query, query, query, query, query, query, root, set, slot, slots, totalQuantity, union
- The current viewers of this inventory
hasViewersboolean hasViewers()Checks for whether this Inventory currently has viewers.
- True if viewers are currently looking at this inventory
player- the Player wishing to interact with this Inventory
- true if the Entity is able to interact with this Inventory
asMenuInventoryMenu asMenu()Create a new
InventoryMenubased on this ViewableInventory which allows for lightweight callbacks on inventory clicks and changes. To receive callbacks the inventory must be opened from
- The new InventoryMenu
builderstatic ViewableInventory.Builder builder()
- The builder