public class Serializer
extends java.lang.Object
| Constructor | Description |
|---|---|
Serializer() |
| Modifier and Type | Method | Description |
|---|---|---|
static org.bukkit.inventory.ItemStack |
loadItem(org.bukkit.configuration.ConfigurationSection config) |
Gets the data for a serialized ItemStack and deserializes it into an ItemStack object.
|
static org.bukkit.Location |
loadLocation(org.bukkit.configuration.ConfigurationSection config) |
Gets the data for a serialized Location and deserializes it into a Location object.
|
static org.bukkit.potion.PotionEffect |
loadPotionEffect(org.bukkit.configuration.ConfigurationSection config) |
Gets the data for a list of serialized PotionEffects and deserializes them into a list of PotionEffect objects.
|
static org.bukkit.Location |
loadSpawn(org.bukkit.configuration.ConfigurationSection config,
org.bukkit.World world) |
Loads a spawn with the set World as a target.
|
static java.util.List<org.bukkit.Location> |
loadSpawnList(org.bukkit.configuration.ConfigurationSection config,
org.bukkit.World world) |
Gets the data for a list of serialized Locations and deserializes them into a list of Location objects.
|
static void |
saveItem(org.bukkit.configuration.ConfigurationSection config,
java.lang.String path,
org.bukkit.inventory.ItemStack item) |
Serializes an ItemStack and saves it to a ConfigurationSection.
|
static void |
saveLocation(org.bukkit.configuration.ConfigurationSection config,
java.lang.String path,
org.bukkit.Location location) |
Serializes a Location and saves it to a ConfigurationSection
|
static void |
savePotionEffects(org.bukkit.configuration.ConfigurationSection config,
java.lang.String path,
java.util.List<org.bukkit.potion.PotionEffect> effects) |
Serializes a list of PotionEffects and saves it to a ConfigurationSection
|
static void |
saveSpawn(org.bukkit.configuration.ConfigurationSection config,
java.lang.String path,
org.bukkit.Location location) |
|
static void |
saveSpawnList(org.bukkit.configuration.ConfigurationSection config,
java.util.List<org.bukkit.Location> locations) |
Serializes a list of Locations and saves it to a ConfigurationSection
|
public static org.bukkit.inventory.ItemStack loadItem(org.bukkit.configuration.ConfigurationSection config)
config - the ConfigurationSection the serialized ItemStack is to be loaded frompublic static void saveItem(org.bukkit.configuration.ConfigurationSection config,
java.lang.String path,
org.bukkit.inventory.ItemStack item)
config - the ConfigurationSection the serialized ItemStack is to be saved topath - the path within the ConfigurationSection to save the ItemStack toitem - the ItemStack to serializepublic static org.bukkit.Location loadLocation(org.bukkit.configuration.ConfigurationSection config)
config - the ConfigurationSection the serialized Location is to be loaded frompublic static org.bukkit.Location loadSpawn(org.bukkit.configuration.ConfigurationSection config,
org.bukkit.World world)
config - the ConfigurationSection to load the spawn fromworld - the World to set the spawn topublic static void saveLocation(org.bukkit.configuration.ConfigurationSection config,
java.lang.String path,
org.bukkit.Location location)
config - the ConfigurationSection the serialized Location is to be saved topath - the path within the ConfigurationSection to save the Location tolocation - the Location to serializepublic static java.util.List<org.bukkit.Location> loadSpawnList(org.bukkit.configuration.ConfigurationSection config,
org.bukkit.World world)
config - the ConfigurationSection the list of serialized Locations is to be loaded fromworld - the World to set the spawns topublic static void saveSpawn(org.bukkit.configuration.ConfigurationSection config,
java.lang.String path,
org.bukkit.Location location)
public static void saveSpawnList(org.bukkit.configuration.ConfigurationSection config,
java.util.List<org.bukkit.Location> locations)
config - the ConfigurationSection the serialized Locations are to be saved tolocations - the Locations to serializepublic static org.bukkit.potion.PotionEffect loadPotionEffect(org.bukkit.configuration.ConfigurationSection config)
config - the ConfigurationSection to load effects frompublic static void savePotionEffects(org.bukkit.configuration.ConfigurationSection config,
java.lang.String path,
java.util.List<org.bukkit.potion.PotionEffect> effects)
config - the ConfigurationSection to save the effects inpath - the path within the Configuration to save the effects toeffects - the list of PotionEffects to serialize