9
0
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:
DaRacci
2022-09-27 00:10:12 +10:00
parent 16ba41f39a
commit eca8726323

View File

@@ -348,6 +348,11 @@ class EcoBoss(
if (modelEngineID.isNotBlank() && Bukkit.getPluginManager().isPluginEnabled("modelEngine")) {
val model = ModelEngineAPI.createActiveModel(modelEngineID)
if (model == null) {
plugin.logger.warning("Invalid modelEngineID for boss $id")
}
val modelled = ModelEngineAPI.createModeledEntity(mob)
modelled.addModel(model, true)
modelled.isBaseEntityVisible = false