@ThreadSafe public interface Inventory
Modifier and Type | Method and Description |
---|---|
int |
id()
Obtains the ID of the inventory
|
Item |
itemAt(int slot)
Finds the item at the specified slot in the inventory
|
Item[] |
items()
Obtains the contents of the inventory represented by this inventory
|
int |
length()
The available slots (not the slots taken up) in this inventory
|
String |
name()
The title of the inventory
|
boolean |
putItem(Item item)
Places an item into the player's inventory, where there is room
|
void |
setSlot(int index,
Item value)
Sets the item at the slot.
|
int id()
int length()
Item itemAt(int slot)
slot
- the slot to find the itemvoid setSlot(int index, Item value)
index
- the index which to set the item atvalue
- the item to set at the indexboolean putItem(Item item)
item
- the item to placeString name()
Copyright © 2016. All rights reserved.