This repository was archived by the owner on Apr 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
api/src/main/java/com/undefined/api/event
common/src/main/java/com/undefined/api/utils/item Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ inline fun <reified T : Event> event(
2020 priority : EventPriority = EventPriority .NORMAL ,
2121 ignoreCancelled : Boolean = false,
2222 crossinline callback : T .() -> Unit
23- ): UndefinedListener = UndefinedListener ().apply {
23+ ): UndefinedListener = UndefinedListener ().apply {
2424 com.undefined.api.API .plugin.server.pluginManager.registerEvent(
2525 T ::class .java,
2626 this ,
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ plugins {
1212}
1313
1414apply (plugin = " maven-publish" )
15- val versionVar = " 0.5.84 "
15+ val versionVar = " 0.5.85 "
1616val groupIdVar = " com.undefined"
1717val artifactIdVar = " api"
1818
Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ class ItemBuilder(private val material: Material) {
5151 return this
5252 }
5353
54+ fun setLore (lore : List <Component >): ItemBuilder {
55+ this .lore = lore.toMutableList()
56+ return this
57+ }
58+
5459 fun setLore (vararg lore : Component ): ItemBuilder {
5560 this .lore = lore.toMutableList()
5661 return this
@@ -61,6 +66,11 @@ class ItemBuilder(private val material: Material) {
6166 return this
6267 }
6368
69+ fun setLore (vararg lore : String ): ItemBuilder {
70+ this .lore = lore.map { it.miniMessage() }.toMutableList()
71+ return this
72+ }
73+
6474 fun addLore (vararg lore : Component ): ItemBuilder {
6575 this .lore.addAll(lore.toList())
6676 return this
You can’t perform that action at this time.
0 commit comments