API for saving & loading inventories in files.
German version
Currently, special properties that only specific items have, like text of books, are not supported.
They will be added in a future release.
- Saving inventories
// Inventory, File
InventorySerializer.serialize(inventory, file);
// ItemStack[], PrintWriter
InventorySerializer.serialize(items, out);
- Serializing single items
// ItemStack
String str = InventorySerializer.serialize0(item);
- Loading inventories
// File
Inventory inv = InventorySerializer.deserialize(file);
You don't have to care about the version, old files are automatically loaded with the old api and saved with the newest version.