Class Poses

All Implemented Interfaces:
Runnable, Listener

public class Poses extends Trait
Persists named Poses.
  • Constructor Details

    • Poses

      public Poses()
  • Method Details

    • addPose

      public boolean addPose(String name, Location location)
      Add a Pose
      Returns:
      whether the pose has already been added
    • addPose

      public boolean addPose(String name, Location location, boolean isDefault)
      Add a Pose
      Returns:
      whether the pose has already been added
    • assumePose

      public void assumePose(Location location)
      Sets the yaw/pitch to the supplied Location.
    • assumePose

      public void assumePose(String flag)
      Sets the yaw/pitch to the stored pose, looked up by name.
    • describe

      public void describe(CommandSender sender, int page) throws CommandException
      Throws:
      CommandException
    • getPose

      public Pose getPose(String name)
    • hasPose

      public boolean hasPose(String pose)
    • 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
    • removePose

      public boolean removePose(String pose)
    • run

      public void run()
      Description copied from class: Trait
      Called every tick if overridden.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Trait
    • 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
    • setDefaultPose

      public void setDefaultPose(String pose)