From 925fc56cab1069d824e727a85e7782c4b408e84f Mon Sep 17 00:00:00 2001 From: Auxilor Date: Thu, 6 Jan 2022 16:13:17 +0000 Subject: [PATCH] MythicMobs integration uses apiHelper where possible --- .../integrations/customentities/CustomEntitiesMythicMobs.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customentities/CustomEntitiesMythicMobs.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customentities/CustomEntitiesMythicMobs.kt index a5bb6824..e61c6ec5 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customentities/CustomEntitiesMythicMobs.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customentities/CustomEntitiesMythicMobs.kt @@ -8,17 +8,18 @@ import io.lumine.xikage.mythicmobs.MythicMobs class CustomEntitiesMythicMobs : CustomEntitiesWrapper { override fun registerAllEntities() { val mobManager = MythicMobs.inst().mobManager + val api = MythicMobs.inst().apiHelper for (id in mobManager.mobNames) { val key = NamespacedKeyUtils.create("mythicmobs", id.lowercase()) CustomEntity( key, { - val entityId = mobManager.getMythicMobInstance(it)?.type?.entityType ?: return@CustomEntity false + val entityId = api.getMythicMobInstance(it)?.type?.entityType ?: return@CustomEntity false entityId.equals(id, ignoreCase = true) }, { - MythicMobs.inst().apiHelper.spawnMythicMob(id, it) + api.spawnMythicMob(id, it) } ).register() }