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
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAll possible types a container can have. -
Method Summary
Modifier and TypeMethodDescription@NotNull ItemStackitem(int index) Gets an item by its index.@NotNull ItemStackSets the item at the specified index.items()Gets the underlying list of items.@NotNull Componenttitle()Gets the title of the container.@NotNull Container.Typetype()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
-