remove , and ;
This commit is contained in:
@@ -8,21 +8,21 @@ import org.bukkit.entity.ArmorStand
|
|||||||
|
|
||||||
class ModelEnginePetEntity(
|
class ModelEnginePetEntity(
|
||||||
pet: Pet,
|
pet: Pet,
|
||||||
private val modelID: String,
|
private val modelID: String
|
||||||
) : PetEntity(pet) {
|
) : PetEntity(pet) {
|
||||||
override fun spawn(location: Location): ArmorStand {
|
override fun spawn(location: Location): ArmorStand {
|
||||||
val stand = emptyArmorStandAt(location, pet)
|
val stand = emptyArmorStandAt(location, pet)
|
||||||
val entityAnimation = pet.entityAnimation;
|
val entityAnimation = pet.entityAnimation
|
||||||
|
|
||||||
val model = ModelEngineAPI.createActiveModel(modelID)
|
val model = ModelEngineAPI.createActiveModel(modelID)
|
||||||
val animationHandler = model.animationHandler;
|
val animationHandler = model.animationHandler
|
||||||
val animationProperty = animationHandler.getAnimation(entityAnimation);
|
val animationProperty = animationHandler.getAnimation(entityAnimation)
|
||||||
|
|
||||||
if (animationProperty != null) {
|
if (animationProperty != null) {
|
||||||
animationHandler.playAnimation(animationProperty, true)
|
animationHandler.playAnimation(animationProperty, true)
|
||||||
} else {
|
} else {
|
||||||
EcoPetsPlugin.instance.logger.warning("$entityAnimation not found in model $modelID, im use walk animation")
|
EcoPetsPlugin.instance.logger.warning("$entityAnimation not found in model $modelID, im use walk animation")
|
||||||
val animationPropertyWalk = animationHandler.getAnimation("walk");
|
val animationPropertyWalk = animationHandler.getAnimation("walk")
|
||||||
if (animationPropertyWalk != null) {
|
if (animationPropertyWalk != null) {
|
||||||
animationHandler.playAnimation(animationPropertyWalk, true)
|
animationHandler.playAnimation(animationPropertyWalk, true)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user