diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/mob/impl/ConfigDrivenEcoMob.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/mob/impl/ConfigDrivenEcoMob.kt index 6c519f4..69162cc 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/mob/impl/ConfigDrivenEcoMob.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/mob/impl/ConfigDrivenEcoMob.kt @@ -353,7 +353,6 @@ internal class ConfigDrivenEcoMob( return trackedMobs[uuid] } - @Suppress("UNCHECKED_CAST") override fun spawn(location: Location, reason: SpawnReason): LivingMob? { // Call bukkit event val preSpawnEvent = EcoMobPreSpawnEvent(this, reason) @@ -364,7 +363,7 @@ internal class ConfigDrivenEcoMob( } // Spawn bukkit mob - val entity = mob.spawn(location) as? Mob ?: throw IllegalStateException("Mob is not a mob") + val entity = mob.spawn(location) as? Mob ?: throw IllegalStateException("Base entity must be a mob!") // Mark as custom mob entity.ecoMob = this