public class InventoryStringConverter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static WauzCore |
core
A direct reference to the main class.
|
Constructor and Description |
---|
InventoryStringConverter() |
Modifier and Type | Method and Description |
---|---|
static org.bukkit.inventory.Inventory |
deserializeInventory(org.bukkit.inventory.Inventory inventory,
java.util.List<?> dataStrings)
Deserializes the given inventory from a string list.
|
static void |
loadInventory(org.bukkit.entity.Player player)
Deserializes the player inventory and current stats to the selected character config.
|
static void |
saveInventory(org.bukkit.entity.Player player)
Serializes the player inventory and current stats to the selected character config.
|
static java.util.List<java.lang.String> |
serailizeInventory(org.bukkit.inventory.Inventory inventory)
Serializes the given inventory into a string list.
|
private static WauzCore core
public static void saveInventory(org.bukkit.entity.Player player)
player
- The player whose inventory should be serialized.WauzPlayerDataSectionSelections.getSelectedCharacterSlot()
public static void loadInventory(org.bukkit.entity.Player player)
player
- The player whose inventory should be deserialized.WauzPlayerDataSectionSelections.getSelectedCharacterSlot()
public static java.util.List<java.lang.String> serailizeInventory(org.bukkit.inventory.Inventory inventory)
inventory
- The inventory to save.public static org.bukkit.inventory.Inventory deserializeInventory(org.bukkit.inventory.Inventory inventory, java.util.List<?> dataStrings)
inventory
- The inventory to load.dataStrings
- The data to insert.