package tools;

import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.PotionMeta;
import org.bukkit.potion.PotionData;
import org.bukkit.potion.PotionType;

import java.util.ArrayList;
import java.util.List;

public class StackUtil {
    public static ItemStack diamondSword(){
        ItemStack item = new ItemStack(Material.DIAMOND_SWORD);
        int randint = RandomUtil.getRandomInt(0,100);
        if(randint >= 50){
            item.setType(Material.NETHERITE_SWORD);
        }
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName("§6§l农夫的神剑");
        List<String> lore = new ArrayList<>();
        lore.add("§7#极光像素工作室制作");
        meta.setLore(lore);
        meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
        meta.setUnbreakable(true);
        item.setItemMeta(meta);
        return item;
    }
    public static ItemStack trident(){
        ItemStack item = new ItemStack(Material.TRIDENT);
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName("§6§l三叉戟");
        List<String> lore = new ArrayList<>();
        lore.add("§7#极光像素工作室制作");
        meta.setLore(lore);
        meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
        meta.setUnbreakable(true);
        item.setItemMeta(meta);
        return item;
    }
}
