Class Anchors

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

public class Anchors extends Trait
Persists a list of Anchors.
  • Constructor Details

    • Anchors

      public Anchors()
  • Method Details

    • addAnchor

      public boolean addAnchor(String name, Location location)
    • getAnchor

      public Anchor getAnchor(String name)
    • getAnchors

      public List<Anchor> getAnchors()
    • load

      public void load(DataKey key) throws NPCLoadException
      Description copied from class: Trait
      Loads a trait.
      Overrides:
      load in class Trait
      Parameters:
      key - DataKey to load from
      Throws:
      NPCLoadException - Thrown if this trait failed to load properly
    • removeAnchor

      public boolean removeAnchor(Anchor anchor)
    • save

      public void save(DataKey key)
      Description copied from class: Trait
      Saves a trait.
      Overrides:
      save in class Trait
      Parameters:
      key - DataKey to save to