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(
20
20
priority : EventPriority = EventPriority .NORMAL ,
21
21
ignoreCancelled : Boolean = false,
22
22
crossinline callback : T .() -> Unit
23
- ): UndefinedListener = UndefinedListener ().apply {
23
+ ): UndefinedListener = UndefinedListener ().apply {
24
24
com.undefined.api.API .plugin.server.pluginManager.registerEvent(
25
25
T ::class .java,
26
26
this ,
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ plugins {
12
12
}
13
13
14
14
apply (plugin = " maven-publish" )
15
- val versionVar = " 0.5.84 "
15
+ val versionVar = " 0.5.85 "
16
16
val groupIdVar = " com.undefined"
17
17
val artifactIdVar = " api"
18
18
Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ class ItemBuilder(private val material: Material) {
51
51
return this
52
52
}
53
53
54
+ fun setLore (lore : List <Component >): ItemBuilder {
55
+ this .lore = lore.toMutableList()
56
+ return this
57
+ }
58
+
54
59
fun setLore (vararg lore : Component ): ItemBuilder {
55
60
this .lore = lore.toMutableList()
56
61
return this
@@ -61,6 +66,11 @@ class ItemBuilder(private val material: Material) {
61
66
return this
62
67
}
63
68
69
+ fun setLore (vararg lore : String ): ItemBuilder {
70
+ this .lore = lore.map { it.miniMessage() }.toMutableList()
71
+ return this
72
+ }
73
+
64
74
fun addLore (vararg lore : Component ): ItemBuilder {
65
75
this .lore.addAll(lore.toList())
66
76
return this
You can’t perform that action at this time.
0 commit comments