Package net.citizensnpcs.trait.waypoint
Class WanderWaypointProvider
java.lang.Object
net.citizensnpcs.trait.waypoint.WanderWaypointProvider
- All Implemented Interfaces:
Persistable,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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.citizensnpcs.trait.waypoint.WaypointProvider
WaypointProvider.EnumerableWaypointProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRegionCentre(Location centre) voidaddRegionCentres(Collection<Location> centre) createEditor(CommandSender sender, CommandContext args) Creates anWaypointEditorwith the givenCommandSender.intgetDelay()intintbooleanbooleanisPaused()Returns whether this provider has paused execution of waypoints.voidvoidonRemove()Called when the provider is removed from the NPC.voidCalled when theNPCattached to this provider is spawned.voidremoveRegionCentre(Location centre) voidremoveRegionCentres(Collection<Location> centre) voidvoidsetDelay(int delay) voidsetPathfind(boolean pathfind) voidsetPaused(boolean paused) Pauses waypoint execution.voidsetWorldGuardRegion(String region) voidsetXYRange(int xrange, int yrange)
-
Constructor Details
-
WanderWaypointProvider
public WanderWaypointProvider()
-
-
Method Details
-
addRegionCentre
-
addRegionCentres
-
createEditor
Description copied from interface:WaypointProviderCreates anWaypointEditorwith the givenCommandSender.- Specified by:
createEditorin interfaceWaypointProvider- Parameters:
sender- The player to link the editor withargs-- Returns:
- The editor
-
getDelay
public int getDelay() -
getRegionCentres
-
getWorldGuardRegion
-
getXRange
public int getXRange() -
getYRange
public int getYRange() -
isPathfind
public boolean isPathfind() -
isPaused
public boolean isPaused()Description copied from interface:WaypointProviderReturns whether this provider has paused execution of waypoints.- Specified by:
isPausedin interfaceWaypointProvider- Returns:
- Whether the provider is paused.
-
load
- Specified by:
loadin interfacePersistable
-
onRemove
public void onRemove()Description copied from interface:WaypointProviderCalled when the provider is removed from the NPC.- Specified by:
onRemovein interfaceWaypointProvider
-
onSpawn
Description copied from interface:WaypointProviderCalled when theNPCattached to this provider is spawned.- Specified by:
onSpawnin interfaceWaypointProvider- Parameters:
npc- The attached NPC
-
removeRegionCentre
-
removeRegionCentres
-
save
- Specified by:
savein interfacePersistable
-
setDelay
public void setDelay(int delay) -
setPathfind
public void setPathfind(boolean pathfind) -
setPaused
public void setPaused(boolean paused) Description copied from interface:WaypointProviderPauses waypoint execution.- Specified by:
setPausedin interfaceWaypointProvider- Parameters:
paused- Whether to pause waypoint execution.
-
setWorldGuardRegion
-
setXYRange
public void setXYRange(int xrange, int yrange)
-