diff --git a/silk-core/src/main/kotlin/net/silkmc/silk/core/item/ItemBuilder.kt b/silk-core/src/main/kotlin/net/silkmc/silk/core/item/ItemBuilder.kt index 587d3824..44e5ce9c 100644 --- a/silk-core/src/main/kotlin/net/silkmc/silk/core/item/ItemBuilder.kt +++ b/silk-core/src/main/kotlin/net/silkmc/silk/core/item/ItemBuilder.kt @@ -41,6 +41,17 @@ fun ItemStack.setLore(text: Collection) { ) } +/** + * Sets the item lore, which is displayed below the display + * name of the item stack. Each child of the first children of + * the generated literal text represents one line. + */ +fun ItemStack.setLore(baseText: String = "", builder: LiteralTextBuilder.() -> Unit) { + literalText(baseText, builder).siblings.firstOrNull()?.let { + setLore(it.siblings) + } +} + /** * Opens a [LiteralTextBuilder] to change the custom name of * the item stack. See [literalText].