public class SPlayerInventory extends Object implements ConfigurationSerializable
PlayerInventory
that is capable of being serializedModifier and Type | Field and Description |
---|---|
protected ItemStack |
boots
The
ItemStack stored on the player's feet |
protected ItemStack |
chest
The
ItemStack stored on the player's torso |
protected ItemStack |
helmet
The
ItemStack stored on the player's head |
protected SInventory |
inv
The general contents of the player's inventory
|
protected ItemStack |
legs
The
ItemStack stored on the player's legs |
Constructor and Description |
---|
SPlayerInventory(Map<String,Object> config)
ConfigurationSerializable constructor. |
SPlayerInventory(PlayerInventory inv)
Copies the contents of the passed
PlayerInventory |
Modifier and Type | Method and Description |
---|---|
static SPlayerInventory |
deserialize(Map<String,Object> config)
Creates a new
SPlayerInventory object and returns it. |
ItemStack |
getBoots()
Returns the item in the boots slot of the
PlayerInventory |
ItemStack |
getChestplate()
Returns the item in the torso slot of the
PlayerInventory |
ItemStack |
getHelmet()
Returns the item in the helmet slot of the
PlayerInventory |
SInventory |
getInventory()
Returns the underlying
SInventory object that stores normal
inventory items |
ItemStack |
getLeggings()
Returns the item in the pants slot of the
PlayerInventory |
Map<String,Object> |
serialize() |
void |
set(PlayerInventory inv)
Sets the current contents of this class into a passed
PlayerInventory |
static SPlayerInventory |
valueOf(Map<String,Object> config)
Creates a new
SPlayerInventory object and returns it. |
protected final SInventory inv
public SPlayerInventory(PlayerInventory inv)
PlayerInventory
inv
- The PlayerInventory
to copypublic SPlayerInventory(Map<String,Object> config)
ConfigurationSerializable
constructor. Should not be used by
anything other than Bukkit.config
- A serialized Map
of this objectpublic ItemStack getHelmet()
PlayerInventory
PlayerInventory
public ItemStack getChestplate()
PlayerInventory
PlayerInventory
public ItemStack getLeggings()
PlayerInventory
PlayerInventory
public ItemStack getBoots()
PlayerInventory
PlayerInventory
public SInventory getInventory()
SInventory
object that stores normal
inventory itemsSInventory
objectpublic void set(PlayerInventory inv)
PlayerInventory
inv
- The PlayerInventory
to store intopublic Map<String,Object> serialize()
serialize
in interface ConfigurationSerializable
public static SPlayerInventory valueOf(Map<String,Object> config)
SPlayerInventory
object and returns it. Should only
be used by Bukkitconfig
- A serialized Map
of this objectSPlayerInventory
objectpublic static SPlayerInventory deserialize(Map<String,Object> config)
SPlayerInventory
object and returns it. Should only
be used by Bukkitconfig
- A serialized Map
of this objectSPlayerInventory
objectCopyright © 2017. All rights reserved.