mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-21 07:59:28 +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")) {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user