public static ItemStack buildItemStack(Material material, int amount, short materialData, String name, String... lore) {
        ItemStack i = new ItemStack(material, amount, materialData);
        ItemMeta meta = i.getItemMeta();
        meta.setDisplayName(name);
        if (lore != null && lore.length > 0) {
            meta.setLore(Arrays.asList(lore));
        }
        i.setItemMeta(meta);
        return i;
    }