Package eu.sculkpowered.server.container
Interface Container
- All Known Subinterfaces:
AnvilContainer
,BeaconContainer
,BrewingStandContainer
,EnchantmentTableContainer
,FurnaceContainer
,Inventory
,LecternContainer
,LoomContainer
,StonecutterContainer
public interface Container
Represents a container of items.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
All possible types a container can have. -
Method Summary
Modifier and TypeMethodDescription@NotNull ItemStack
item
(int index) Gets an item by its index.@NotNull ItemStack
Sets the item at the specified index.items()
Gets the underlying list of items.@NotNull Component
title()
Gets the title of the container.@NotNull Container.Type
type()
Gets the type of the container
-
Method Details
-
title
Gets the title of the container.- Returns:
- the title of the container
- Since:
- 1.0.0
-
type
Gets the type of the container- Returns:
- the type of the container
- Since:
- 1.0.0
-
item
Sets the item at the specified index.- Parameters:
index
- the index of the itemitem
- the item to set- Returns:
- the item previously at the index
- Since:
- 1.0.0
-
item
Gets an item by its index.- Parameters:
index
- the index of the item- Returns:
- the item at the specified index
- Since:
- 1.0.0
-
items
Gets the underlying list of items.- Returns:
- the list of items
- Since:
- 1.0.0
-