edit
Creates a modified copy of this ItemStack using a DSL builder. The original ItemStack is not modified.
Example:
val original = ItemStack(Material.IRON_SWORD)
val modified = original.edit {
displayName = Component.text("Modified Sword")
enchant(Enchantment.SHARPNESS, 2)
}Content copied to clipboard
Return
A new modified ItemStack
Parameters
action
The builder configuration lambda