public class SInventory extends Object implements ConfigurationSerializable
Modifier and Type | Field and Description |
---|---|
protected List<ItemStack> |
items
Represents a collection of the relevant inventory items
|
Constructor and Description |
---|
SInventory(ItemStack... contents)
Copies the passed
ItemStack objects |
SInventory(Map<String,Object> config)
ConfigurationSerializable constructor. |
Modifier and Type | Method and Description |
---|---|
static SInventory |
deserialize(Map<String,Object> config)
Creates a new
SInventory object and returns it. |
List<ItemStack> |
getContents()
Returns a copy of this instance's stored
ItemStacks |
ItemStack[] |
getContentsAsArray()
Returns a copy of this instance's stored
ItemStacks |
Map<String,Object> |
serialize() |
static SInventory |
valueOf(Map<String,Object> config)
Creates a new
SInventory object and returns it. |
public SInventory(ItemStack... contents)
ItemStack
objectscontents
- The ItemStack
s to copypublic SInventory(Map<String,Object> config)
ConfigurationSerializable
constructor. Should not be used by
anything other than Bukkit.config
- A serialized Map
of this objectpublic List<ItemStack> getContents()
ItemStacks
ItemStacks
public ItemStack[] getContentsAsArray()
ItemStacks
ItemStacks
public Map<String,Object> serialize()
serialize
in interface ConfigurationSerializable
public static SInventory valueOf(Map<String,Object> config)
SInventory
object and returns it. Should only be
used by Bukkitconfig
- A serialized Map
of this objectSInventory
objectpublic static SInventory deserialize(Map<String,Object> config)
SInventory
object and returns it. Should only be
used by Bukkitconfig
- A serialized Map
of this objectSInventory
objectCopyright © 2017. All rights reserved.