Class Waypoint

java.lang.Object
net.citizensnpcs.trait.waypoint.Waypoint

public class Waypoint extends Object
Represents a Location with a number of WaypointTriggers that activate on reaching the location.
  • Constructor Details

    • Waypoint

      public Waypoint()
      For persistence - avoid using otherwise.
    • Waypoint

      public Waypoint(Location at)
  • Method Details

    • addTrigger

      public void addTrigger(WaypointTrigger trigger)
    • describeTriggers

      public void describeTriggers(CommandSender sender)
    • distance

      public double distance(Waypoint dest)
      Returns the distance in blocks to another waypoint.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getLocation

      public Location getLocation()
    • getTriggers

      public List<WaypointTrigger> getTriggers()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • onReach

      public void onReach(NPC npc)
      Runs waypoint triggers for the given NPC.
    • toString

      public String toString()
      Overrides:
      toString in class Object