Class ScaledMaxHealthTrait

java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.ScaledMaxHealthTrait
All Implemented Interfaces:
Runnable, Listener

public class ScaledMaxHealthTrait extends Trait
  • Constructor Details

    • ScaledMaxHealthTrait

      public ScaledMaxHealthTrait()
  • Method Details

    • getMaxHealth

      public Double getMaxHealth()
    • onDamage

      public void onDamage(NPCDamageEvent event)
    • onSpawn

      public void onSpawn()
      Description copied from class: Trait
      Called when an NPC is spawned. NPC.getEntity() will return null until this is called. This is also called onAttach when the NPC is already spawned.
      Overrides:
      onSpawn in class Trait
    • setMaxHealth

      public void setMaxHealth(Double maxHealth)