Class WanderWaypointProvider

java.lang.Object
net.citizensnpcs.trait.waypoint.WanderWaypointProvider
All Implemented Interfaces:
Persistable, WaypointProvider

public class WanderWaypointProvider extends Object implements WaypointProvider
A wandering waypoint provider that wanders between either a box centered at the current location or inside a region defined by a list of boxes.
  • Constructor Details

    • WanderWaypointProvider

      public WanderWaypointProvider()
  • Method Details

    • addRegionCentre

      public void addRegionCentre(Location centre)
    • addRegionCentres

      public void addRegionCentres(Collection<Location> centre)
    • createEditor

      public WaypointEditor createEditor(CommandSender sender, CommandContext args)
      Description copied from interface: WaypointProvider
      Creates an WaypointEditor with the given CommandSender.
      Specified by:
      createEditor in interface WaypointProvider
      Parameters:
      sender - The player to link the editor with
      args -
      Returns:
      The editor
    • getDelay

      public int getDelay()
    • getRegionCentres

      public List<Location> getRegionCentres()
    • getWorldGuardRegion

      public Object getWorldGuardRegion()
    • getXRange

      public int getXRange()
    • getYRange

      public int getYRange()
    • isPathfind

      public boolean isPathfind()
    • isPaused

      public boolean isPaused()
      Description copied from interface: WaypointProvider
      Returns whether this provider has paused execution of waypoints.
      Specified by:
      isPaused in interface WaypointProvider
      Returns:
      Whether the provider is paused.
    • load

      public void load(DataKey key)
      Specified by:
      load in interface Persistable
    • onRemove

      public void onRemove()
      Description copied from interface: WaypointProvider
      Called when the provider is removed from the NPC.
      Specified by:
      onRemove in interface WaypointProvider
    • onSpawn

      public void onSpawn(NPC npc)
      Description copied from interface: WaypointProvider
      Called when the NPC attached to this provider is spawned.
      Specified by:
      onSpawn in interface WaypointProvider
      Parameters:
      npc - The attached NPC
    • removeRegionCentre

      public void removeRegionCentre(Location centre)
    • removeRegionCentres

      public void removeRegionCentres(Collection<Location> centre)
    • save

      public void save(DataKey key)
      Specified by:
      save in interface Persistable
    • setDelay

      public void setDelay(int delay)
    • setPathfind

      public void setPathfind(boolean pathfind)
    • setPaused

      public void setPaused(boolean paused)
      Description copied from interface: WaypointProvider
      Pauses waypoint execution.
      Specified by:
      setPaused in interface WaypointProvider
      Parameters:
      paused - Whether to pause waypoint execution.
    • setWorldGuardRegion

      public void setWorldGuardRegion(String region)
    • setXYRange

      public void setXYRange(int xrange, int yrange)