Skip to content

Commit 10de6ea

Browse files
committed
fix: paperweight
1 parent d52a9ad commit 10de6ea

5 files changed

Lines changed: 59 additions & 49 deletions

File tree

gradle/wrapper/gradle-wrapper.jar

-16.8 KB
Binary file not shown.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#Mon Dec 30 14:33:57 CET 2024
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 31 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 21 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class ItemBuilder(material: Material, count: Int = 1, dsl: ItemBuilder.() -> Uni
179179
* @param glinting true if the item should have a glint effect, false otherwise
180180
* @return the updated ItemBuilder instance
181181
*/
182-
fun setGlinting(glinting: Boolean): ItemBuilder {
182+
fun glinting(glinting: Boolean): ItemBuilder {
183183
meta<ItemMeta> {
184184
this.setEnchantmentGlintOverride(glinting)
185185
}
@@ -200,7 +200,7 @@ class ItemBuilder(material: Material, count: Int = 1, dsl: ItemBuilder.() -> Uni
200200
return this
201201
}
202202

203-
fun setCustomModelDataComponents(
203+
fun customModelDataComponents(
204204
floats: List<Float> = listOf(),
205205
flags: List<Boolean> = listOf(),
206206
strings: List<String> = listOf(),
@@ -212,20 +212,6 @@ class ItemBuilder(material: Material, count: Int = 1, dsl: ItemBuilder.() -> Uni
212212
return this
213213
}
214214

215-
/**
216-
* Sets the owner of the player skull.
217-
*
218-
* @param uuid The UUID of the player to set as the owner.
219-
* @return The updated ItemBuilder object.
220-
*/
221-
fun setOwner(uuid: UUID): ItemBuilder {
222-
if (itemStack.type != Material.PLAYER_HEAD) return this
223-
val skullMeta = itemStack.itemMeta as SkullMeta
224-
skullMeta.owningPlayer = Bukkit.getOfflinePlayer(uuid)
225-
itemStack.itemMeta = skullMeta
226-
return this
227-
}
228-
229215
/**
230216
* Sets the owner of the skull to the given name.
231217
*
@@ -490,7 +476,7 @@ class ItemBuilder(material: Material, count: Int = 1, dsl: ItemBuilder.() -> Uni
490476
* @param glinting true if the item should have a glint effect, false otherwise
491477
* @return the updated ItemBuilder instance
492478
*/
493-
fun setGlinting(glinting: Boolean, force: Boolean = false): ItemBuilder {
479+
fun glinting(glinting: Boolean, force: Boolean = false): ItemBuilder {
494480
meta<ItemMeta> {
495481
if (!force) {
496482
this.setEnchantmentGlintOverride(if (glinting) true else null)
@@ -504,7 +490,7 @@ class ItemBuilder(material: Material, count: Int = 1, dsl: ItemBuilder.() -> Uni
504490
/**
505491
* Sets the equippable state of the item in the specified slot.
506492
*/
507-
fun setEquippable(slot: EquipmentSlot): ItemBuilder {
493+
fun equippable(slot: EquipmentSlot): ItemBuilder {
508494
val meta = itemStack.itemMeta
509495

510496
val equippable = meta.equippable

0 commit comments

Comments
 (0)