Interface Hotbar
- All Superinterfaces:
Inventory
,Inventory2D
,InventoryRow
,ValueContainer
A human's hotbar.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.item.inventory.Inventory
Inventory.Builder
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the index of the slot that is currently selected by the Humanoid.void
setSelectedSlotIndex
(int index) Sets the slot selected by the Humanoid.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
-
Method Details
-
selectedSlotIndex
int selectedSlotIndex()Gets the index of the slot that is currently selected by the Humanoid.- Returns:
- The slot being currently held as an integer from 0-8, inclusive
-
setSelectedSlotIndex
void setSelectedSlotIndex(int index) Sets the slot selected by the Humanoid.- Parameters:
index
- The slot to hold as an integer from 0-8, inclusive
-