Class AttributeTrait

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

public class AttributeTrait extends Trait
  • Constructor Details

    • AttributeTrait

      public AttributeTrait()
  • Method Details

    • getAttributeValue

      public Double getAttributeValue(Attribute attribute)
    • hasAttribute

      public boolean hasAttribute(Attribute attribute)
    • 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
    • setAttributeValue

      public void setAttributeValue(Attribute attribute, double value)
    • setDefaultAttribute

      public void setDefaultAttribute(Attribute attribute)