Skip to content

LeDennis32/InventorySerializer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

InventorySerializer

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.

Usage

  1. Saving inventories
// Inventory, File
InventorySerializer.serialize(inventory, file);

// ItemStack[], PrintWriter
InventorySerializer.serialize(items, out);
  1. Serializing single items
// ItemStack
String str = InventorySerializer.serialize0(item);
  1. 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.