version-1/Data format
Data format
This is the old pre-2.0 format. Check Data format 2.0
The data format has changed in version 0.8, to add enchantments
The data is stocked as a string in the column 'inventory' of the table, as shown below :
[0(13:0)x1];[1(3:0)x14];[2(25:0)x35];[3(25:0)x1],... [Slot id(item id:data byte|enchantment=level,...)xcount]
The 'pendings' column is used to add items to a player's inventory. the format is the same, but the slot id, as the item will be placed in the first empty slot of the player's inventory.
The format for this columns is a little bit different :
[+(13:0)x3];[-(3:0)x14];[-(25:0)x35];[-(275:0|16=1,16=1)x1],... [param(item id:data byte|enchantment=level,...)xcount]
the 'param' value can be (for the moment) "+" or "-", to adds or delete an item to the inventory.
If the player doesn't have enough item (example you want to remove 15 blocks of Cobblestone but he has only 5 blocs) the plugin withdraws its 5 blocks, and the next 10 blocks of cobblestone that he will get
here is a regex to read the format :
'inventory' column --------------------- \[([0-9]{1,2})\(([0-9]{1,3}):([0-9]{1,2})(\|([0-9=,]*?))?\)x(-?[0-9]{1,2})\] group 1 : slot id group 2 : item id group 3 : data byte group 4 : | + enchantments list group 5 : enchantments list group 6 : count 'pendings' column --------------------- \[(-|\+)?\(([0-9]{1,3}):([0-9]{1,2})(\|([0-9=,]*?))?\)x(-?[0-9]{1,2})\] group 1 : param group 2 : item id group 3 : data byte group 4 : | + enchantments list group 5 : enchantments list group 6 : count