public class InventoryView extends AbstractItemView
If no player object is known an empty inventory view is generated.
Constructor and Description |
---|
InventoryView(@NotNull ItemSet itemSet,
@NotNull java.util.Comparator<CfItem> comparator)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
@Nullable CfItem |
getItem(int index)
Returns the
CfItem in a given slot. |
int |
getSize()
Returns the number of items.
|
void |
setFilter(@NotNull InventoryFilter filter)
Sets the
InventoryFilter . |
addLocationListener, addLocationsListener, addModified, addModifiedRange, removeLocationListener, removeLocationsListener
public int getSize()
ItemView
@Nullable public @Nullable CfItem getItem(int index)
ItemView
CfItem
in a given slot.index
- the slot indexnull
if the slot is emptypublic void setFilter(@NotNull @NotNull InventoryFilter filter)
InventoryFilter
.filter
- the new inventory filter