Example: Item

Create a custom item with name, lore and persistent data

Item example
import io.github.chi2l3s.nextlib.api.item.ItemBuilder;
import io.github.chi2l3s.nextlib.api.item.ItemUtil;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;

ItemStack item = new ItemBuilder(Material.DIAMOND_SWORD)
  .setName("&b&lLegendary Sword")
  .setLore(java.util.List.of("&7A powerful weapon", "&7+10 Damage"))
  .setPersistentData(this, "power", 10)
  .build();

boolean hasPower = ItemUtil.hasPersistentData(item, this, "power");