diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/category/spawning/SpawnMethodFactories.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/category/spawning/SpawnMethodFactories.kt index b1a6d85..9a02fa5 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/category/spawning/SpawnMethodFactories.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/category/spawning/SpawnMethodFactories.kt @@ -1,10 +1,12 @@ package com.willfp.ecomobs.category.spawning import com.willfp.eco.core.registry.Registry +import com.willfp.ecomobs.category.spawning.impl.SpawnMethodFactoryNone import com.willfp.ecomobs.category.spawning.impl.SpawnMethodFactoryReplace object SpawnMethodFactories : Registry() { init { register(SpawnMethodFactoryReplace) + register(SpawnMethodFactoryNone) } } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/category/spawning/impl/SpawnMethodFactoryNone.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/category/spawning/impl/SpawnMethodFactoryNone.kt new file mode 100644 index 0000000..dc7a984 --- /dev/null +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecomobs/category/spawning/impl/SpawnMethodFactoryNone.kt @@ -0,0 +1,33 @@ +package com.willfp.ecomobs.category.spawning.impl + +import com.willfp.eco.core.EcoPlugin +import com.willfp.eco.core.config.interfaces.Config +import com.willfp.eco.core.entities.Entities +import com.willfp.ecomobs.category.MobCategory +import com.willfp.ecomobs.category.spawning.SpawnMethod +import com.willfp.ecomobs.category.spawning.SpawnMethodFactory +import com.willfp.ecomobs.mob.SpawnReason +import com.willfp.libreforge.enumValueOfOrNull +import org.bukkit.entity.EntityType +import org.bukkit.event.EventHandler +import org.bukkit.event.EventPriority +import org.bukkit.event.Listener +import org.bukkit.event.entity.CreatureSpawnEvent + +object SpawnMethodFactoryNone : SpawnMethodFactory("replace") { + override fun create(category: MobCategory, config: Config, plugin: EcoPlugin): SpawnMethod { + return SpawnMethodNone(category, config, plugin) + } + + class SpawnMethodNone( + category: MobCategory, config: Config, plugin: EcoPlugin + ) : SpawnMethod(category, config, plugin) { + override fun onStart() { + + } + + override fun onStop() { + + } + } +} diff --git a/eco-core/core-plugin/src/main/resources/categories/_example.yml b/eco-core/core-plugin/src/main/resources/categories/_example.yml index c7a22b0..471a947 100644 --- a/eco-core/core-plugin/src/main/resources/categories/_example.yml +++ b/eco-core/core-plugin/src/main/resources/categories/_example.yml @@ -14,6 +14,9 @@ spawning: # custom # Uses the EcoMobs spawning system. + # none + # Disables natural spawning + type: replace # Options for replace spawning