Container
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
Implemented Interfaces
Container implements the following interfaces. That means all methods defined in these interfaces are also available in Container
Methods
Return Type: boolean
Parameter | Type |
---|---|
Parameter index | Type int |
Parameter stack | Type ItemStack |
Return Type: int
Parameter | Type |
---|---|
Parameter item | Type ItemDefinition |
Return Type: int
Parameter | Type |
---|---|
Parameter item | Type IItemStack |
Gets the size (how many slots) of this Container
Returns: The amount of slots this Container has.
Return Type: int
Gets the ItemStack in the given slot.
Returns: the ItemStack in the given slot.
Return Type: ItemStack
Parameter | Type | Description |
---|---|---|
Parameter index | Type int | Description The slot index to get. |
Return Type: int
Return Type: boolean
Parameter | Type |
---|---|
Parameter items | Type Set<ItemDefinition> |
Checks if this Container is empty.
Returns: True if empty. False otherwise.
Return Type: boolean
Return Type: ItemStack
Parameter | Type |
---|---|
Parameter var1 | Type int |
Parameter var2 | Type int |
Return Type: ItemStack
Parameter | Type |
---|---|
Parameter index | Type int |
Parameter | Type |
---|---|
Parameter index | Type int |
Parameter stack | Type ItemStack |
Parameter | Type |
---|---|
Parameter player | Type Player |
Return Type: boolean
Parameter | Type |
---|---|
Parameter player | Type Player |
Parameter | Type |
---|---|
Parameter player | Type Player |
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name changed | Type void | Has Getter true | Has Setter false | Description |
Name containerSize | Type int | Has Getter true | Has Setter false | Description Gets the size (how many slots) of this Container |
Name isEmpty | Type boolean | Has Getter true | Has Setter false | Description Checks if this Container is empty. |
Name maxStackSize | Type int | Has Getter true | Has Setter false | Description |