24package com.dreamfirestudios.dreamcore.DreamItems;
26import net.kyori.adventure.text.Component;
27import org.bukkit.Material;
28import org.bukkit.attribute.Attribute;
29import org.bukkit.attribute.AttributeModifier;
30import org.bukkit.enchantments.Enchantment;
31import org.bukkit.inventory.ItemFlag;
32import org.bukkit.persistence.PersistentDataContainer;
33import org.bukkit.plugin.Plugin;
68 default Optional<String>
id() {
return Optional.empty(); }
74 default Component
displayName() {
return Component.text(getClass().getSimpleName()); }
80 default Material
type() {
return Material.DIAMOND_PICKAXE; }
106 default List<Component>
lore() {
return List.of(); }
112 default Set<ItemFlag>
flags() {
return Set.of(); }
147 default void writePdc(Plugin plugin, PersistentDataContainer pdc) { }
Definition for a custom item.
default List< Component > lore()
Lore lines (Adventure).
default Optional< String > id()
Optional stable ID.
default Material type()
Base material type for the item.
default Map< Attribute, Collection< AttributeModifier > > attributeModifiers()
Attribute modifiers.
default Component displayName()
Display name (Adventure).
default Set< ItemFlag > flags()
Item flags to apply (e.g., hide attributes).
default int amount()
Initial stack amount (clamped to ≥ 1).
default void writePdc(Plugin plugin, PersistentDataContainer pdc)
Hook to write any custom Persistent Data Container values.
default Map< Enchantment, Integer > enchantments()
Enchantments to apply after meta is set.
default OptionalInt customModelData()
Optional custom model data.
default boolean unbreakable()
Whether the item is unbreakable.