Class BehaviorTrait

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

public class BehaviorTrait extends Trait
  • Constructor Details

    • BehaviorTrait

      public BehaviorTrait()
  • Method Details

    • onDespawn

      public void onDespawn()
      Description copied from class: Trait
      Called just before the attached NPC is despawned. NPC.getEntity() will be non-null.
      Overrides:
      onDespawn in class Trait
    • 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
    • createTemplateParser

      public static TraitTemplateParser createTemplateParser()