simplify convertItemStack

This commit is contained in:
Ryder Belserion 2024-10-11 09:27:54 -04:00
parent 58dd7f698e
commit 707b1ab474
No known key found for this signature in database

View File

@ -1100,9 +1100,7 @@ public class ItemBuilder {
} }
public static ItemBuilder convertItemStack(String item) { public static ItemBuilder convertItemStack(String item) {
ItemStack itemStack = Methods.fromBase64(item); return new ItemBuilder(Methods.fromBase64(item));
return new ItemBuilder(itemStack).setAmount(itemStack.getAmount()).setEnchantments(new HashMap<>(itemStack.getEnchantments()));
} }
public static ItemBuilder convertItemStack(ItemStack item, Player player) { public static ItemBuilder convertItemStack(ItemStack item, Player player) {