mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-09 08:37:41 +01:00
Set the item's quantity to 1 for every item with MetaData
This commit is contained in:
parent
6474558747
commit
066b735a4c
@ -64,7 +64,10 @@ public class ItemDatabase {
|
||||
*/
|
||||
public String getItemCode(ItemStack item) {
|
||||
try {
|
||||
String code = Base64.encodeObject(yaml.dump(item));
|
||||
ItemStack clone = item.clone();
|
||||
clone.setAmount(1);
|
||||
|
||||
String code = Base64.encodeObject(yaml.dump(clone));
|
||||
table.insertRow("null, '" + code + '\'');
|
||||
|
||||
int id = Integer.parseInt(table.getRow("code='" + code + '\'').get("id"));
|
||||
|
Loading…
Reference in New Issue
Block a user