This commit is contained in:
Will FP 2023-12-27 17:15:54 +01:00
parent 5c422ac240
commit 906471e930
2 changed files with 1 additions and 2 deletions

View File

@ -74,7 +74,7 @@ class EcoEnchantsPlugin : LibreforgePlugin() {
}
override fun handleEnable() {
registerHolderProvider(EnchantFinder.toHolderProvider())
registerHolderProvider(EnchantFinder.provider)
registerSpecificRefreshFunction<LivingEntity> {
it.clearEnchantmentCache()

View File

@ -14,7 +14,6 @@ import java.util.UUID
import java.util.concurrent.TimeUnit
object EnchantFinder : ItemHolderFinder<EcoEnchantLevel>() {
private val provider = this.toHolderProvider()
private val levelCache = Caffeine.newBuilder()
.expireAfterWrite(1, TimeUnit.SECONDS)
.build<UUID, List<ProvidedLevel>>()