Added fast NamespacedKey creation

This commit is contained in:
Auxilor
2022-01-27 12:41:18 +00:00
parent c0be6a12ff
commit feb7ecee48
7 changed files with 72 additions and 5 deletions

View File

@@ -14,6 +14,7 @@ import com.willfp.eco.internal.extensions.EcoExtensionLoader
import com.willfp.eco.internal.factory.EcoMetadataValueFactory
import com.willfp.eco.internal.factory.EcoNamespacedKeyFactory
import com.willfp.eco.internal.factory.EcoRunnableFactory
import com.willfp.eco.internal.fast.EcoFastNamespacedKeyFactory
import com.willfp.eco.internal.gui.EcoGUIFactory
import com.willfp.eco.internal.integrations.PlaceholderIntegrationPAPI
import com.willfp.eco.internal.logging.EcoLogger
@@ -29,6 +30,7 @@ import com.willfp.eco.internal.spigot.proxy.DummyEntityProxy
import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy
import net.kyori.adventure.platform.bukkit.BukkitAudiences
import org.bukkit.Location
import org.bukkit.NamespacedKey
import org.bukkit.entity.Entity
import org.bukkit.inventory.ItemStack
import java.util.logging.Logger
@@ -147,4 +149,8 @@ class EcoHandler : EcoSpigotPlugin(), Handler {
override fun createDummyEntity(location: Location): Entity {
return getProxy(DummyEntityProxy::class.java).createDummyEntity(location)
}
override fun createNamespacedKey(namespace: String, key: String): NamespacedKey {
return EcoFastNamespacedKeyFactory.create(namespace, key)
}
}

View File

@@ -56,4 +56,5 @@ libraries:
- 'mysql:mysql-connector-java:8.0.25'
- 'com.google.guava:guava:31.0.1-jre'
- 'com.zaxxer:HikariCP:5.0.0'
- 'org.apache.commons:commons-lang3:3.0'
- 'org.apache.commons:commons-lang3:3.0'
- 'org.objenesis:objenesis:3.2'