Updated kotlin to use kotlin API
This commit is contained in:
@@ -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 ->
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user