public class SPlayerInventory extends Object implements org.bukkit.configuration.serialization.ConfigurationSerializable
SPlayerInventory
Modifier and Type | Field and Description |
---|---|
protected org.bukkit.inventory.ItemStack |
boots
The
ItemStack stored on the player's feet |
protected org.bukkit.inventory.ItemStack |
chest
The
ItemStack stored on the player's torso |
protected org.bukkit.inventory.ItemStack |
helmet
The
ItemStack stored on the player's head |
protected SInventory |
inv
The general contents of the player's inventory
|
protected org.bukkit.inventory.ItemStack |
legs
The
ItemStack stored on the player's legs |
Constructor and Description |
---|
SPlayerInventory(Map<String,Object> config)
ConfigurationSerializable constructor. |
SPlayerInventory(org.bukkit.inventory.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. |
org.bukkit.inventory.ItemStack |
getBoots()
Returns the item in the boots slot of the
PlayerInventory |
org.bukkit.inventory.ItemStack |
getChestplate()
Returns the item in the torso slot of the
PlayerInventory |
org.bukkit.inventory.ItemStack |
getHelmet()
Returns the item in the helmet slot of the
PlayerInventory |
SInventory |
getInventory()
Returns the underlying
SInventory object that stores normal
inventory items |
org.bukkit.inventory.ItemStack |
getLeggings()
Returns the item in the pants slot of the
PlayerInventory |
Map<String,Object> |
serialize() |
void |
set(org.bukkit.inventory.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 org.bukkit.inventory.ItemStack helmet
ItemStack
stored on the player's headprotected final org.bukkit.inventory.ItemStack chest
ItemStack
stored on the player's torsoprotected final org.bukkit.inventory.ItemStack legs
ItemStack
stored on the player's legsprotected final org.bukkit.inventory.ItemStack boots
ItemStack
stored on the player's feetprotected final SInventory inv
public SPlayerInventory(org.bukkit.inventory.PlayerInventory inv)
PlayerInventory
inv
- The PlayerInventory
to copypublic org.bukkit.inventory.ItemStack getHelmet()
PlayerInventory
PlayerInventory
public org.bukkit.inventory.ItemStack getChestplate()
PlayerInventory
PlayerInventory
public org.bukkit.inventory.ItemStack getLeggings()
PlayerInventory
PlayerInventory
public org.bukkit.inventory.ItemStack getBoots()
PlayerInventory
PlayerInventory
public SInventory getInventory()
SInventory
object that stores normal
inventory itemsSInventory
objectpublic void set(org.bukkit.inventory.PlayerInventory inv)
PlayerInventory
inv
- The PlayerInventory
to store intopublic Map<String,Object> serialize()
serialize
in interface org.bukkit.configuration.serialization.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 © 2015. All rights reserved.