Skip to content

Commit abe07f8

Browse files
committed
fix: set amount
1 parent 051ace8 commit abe07f8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies {
3030

3131
api("dev.fruxz:stacked:2024.1.1") // TODO: Own implementation
3232

33-
api("cc.modlabs:KlassicX:2025.4.16.1914")
33+
api("cc.modlabs:KlassicX:2025.4.22.1239")
3434

3535
testImplementation("io.kotest:kotest-runner-junit5:$koTestVersion")
3636
testImplementation("io.mockk:mockk:${mockkVersion}")

src/main/kotlin/cc/modlabs/kpaper/inventory/ItemBuilder.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ class ItemBuilder(material: Material, count: Int = 1, dsl: ItemBuilder.() -> Uni
7171
return this
7272
}
7373

74+
/**
75+
* Sets the amount of the item stack.
76+
*
77+
* @param amount The amount to set for the item stack.
78+
* @return The updated ItemBuilder instance.
79+
*/
80+
fun amount(amount: Int): ItemBuilder {
81+
itemStack.amount = amount
82+
return this
83+
}
84+
7485
/**
7586
* Updates the item meta by applying the provided DSL (Domain Specific Language) to it.
7687
*

0 commit comments

Comments
 (0)