mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-21 16:09:24 +00:00
fix: check if the model exists
This commit is contained in:
@@ -348,6 +348,11 @@ class EcoBoss(
|
|||||||
|
|
||||||
if (modelEngineID.isNotBlank() && Bukkit.getPluginManager().isPluginEnabled("modelEngine")) {
|
if (modelEngineID.isNotBlank() && Bukkit.getPluginManager().isPluginEnabled("modelEngine")) {
|
||||||
val model = ModelEngineAPI.createActiveModel(modelEngineID)
|
val model = ModelEngineAPI.createActiveModel(modelEngineID)
|
||||||
|
|
||||||
|
if (model == null) {
|
||||||
|
plugin.logger.warning("Invalid modelEngineID for boss $id")
|
||||||
|
}
|
||||||
|
|
||||||
val modelled = ModelEngineAPI.createModeledEntity(mob)
|
val modelled = ModelEngineAPI.createModeledEntity(mob)
|
||||||
modelled.addModel(model, true)
|
modelled.addModel(model, true)
|
||||||
modelled.isBaseEntityVisible = false
|
modelled.isBaseEntityVisible = false
|
||||||
|
|||||||
Reference in New Issue
Block a user