Cleanup DealerInventory and TNTLeagueConfig

This commit is contained in:
2024-12-22 22:22:42 +01:00
parent aaa808f90f
commit 89fe401b03
2 changed files with 3 additions and 10 deletions
@@ -37,7 +37,6 @@ import org.bukkit.inventory.Inventory
import org.bukkit.inventory.ItemStack
import org.bukkit.persistence.PersistentDataType
import java.util.*
import kotlin.math.ceil
class DealerInventory(val player: Player): SWInventoryHolder() {
@@ -83,7 +82,7 @@ class DealerInventory(val player: Player): SWInventoryHolder() {
}
team.coins -= price
player.inventory.addItem(ItemStack.of(item.first.type, amount).also { item.second.extras.forEach { extra -> it.itemMeta = extra.func(it.itemMeta) } })
player.inventory.addItem(ItemStack.of(item.first.type, amount).apply { item.second.extras.forEach { itemMeta = itemMeta.apply(it.func) } })
}
private val items by lazy {