Updated kotlin to use kotlin API

This commit is contained in:
Auxilor
2022-02-03 11:09:36 +00:00
parent f3c69f1c15
commit 0beedc6b07
2 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ import com.willfp.eco.core.display.Display
import com.willfp.eco.core.display.DisplayHandler
import com.willfp.eco.core.display.DisplayModule
import com.willfp.eco.core.display.DisplayPriority
import com.willfp.eco.core.fast.FastItemStack
import com.willfp.eco.core.fast.fast
import org.bukkit.NamespacedKey
import org.bukkit.entity.Player
import org.bukkit.inventory.ItemStack
@@ -60,7 +60,7 @@ class EcoDisplayHandler(plugin: EcoPlugin) : DisplayHandler {
Display.unfinalize(itemStack)
}
val fast = FastItemStack.wrap(itemStack)
val fast = itemStack.fast()
val lore = fast.lore
if (lore.isNotEmpty() && lore.removeIf { line: String ->

View File

@@ -1,6 +1,6 @@
package com.willfp.eco.internal.items
import com.willfp.eco.core.fast.FastItemStack
import com.willfp.eco.core.fast.fast
import com.willfp.eco.core.items.args.LookupArgParser
import com.willfp.eco.util.NamespacedKeyUtils
import org.bukkit.enchantments.Enchantment
@@ -41,7 +41,7 @@ class ArgParserEnchantment : LookupArgParser {
}
return Predicate {
val onItem = FastItemStack.wrap(it).getEnchantmentsOnItem(true)
val onItem = it.fast().getEnchantmentsOnItem(true)
for ((enchant, level) in enchants) {
if ((onItem[enchant] ?: 0) < level) {