Package net.citizensnpcs.trait.waypoint
Class LinearWaypointProvider
java.lang.Object
net.citizensnpcs.trait.waypoint.LinearWaypointProvider
- All Implemented Interfaces:
- Persistable,- WaypointProvider,- WaypointProvider.EnumerableWaypointProvider
public class LinearWaypointProvider
extends Object
implements WaypointProvider.EnumerableWaypointProvider
An ordered list of 
Waypoints to walk between.- 
Nested Class SummaryNested classes/interfaces inherited from interface net.citizensnpcs.trait.waypoint.WaypointProviderWaypointProvider.EnumerableWaypointProvider
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddWaypoint(Waypoint waypoint) booleancreateEditor(CommandSender sender, CommandContext args) Creates anWaypointEditorwith the givenCommandSender.booleanbooleanisPaused()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.voidvoidsetCachePaths(boolean cachePaths) voidsetCycle(boolean cycle) voidsetPaused(boolean paused) Pauses waypoint execution.Returns the modifiable list of waypoints.
- 
Constructor Details- 
LinearWaypointProviderpublic LinearWaypointProvider()
- 
LinearWaypointProvider
 
- 
- 
Method Details- 
addWaypoint
- 
cachePathspublic boolean cachePaths()
- 
createEditorDescription copied from interface:WaypointProviderCreates anWaypointEditorwith the givenCommandSender.- Specified by:
- createEditorin interface- WaypointProvider
- Parameters:
- sender- The player to link the editor with
- args-
- Returns:
- The editor
 
- 
cycleWaypointspublic boolean cycleWaypoints()
- 
getCurrentWaypoint
- 
isPausedpublic boolean isPaused()Description copied from interface:WaypointProviderReturns whether this provider has paused execution of waypoints.- Specified by:
- isPausedin interface- WaypointProvider
- Returns:
- Whether the provider is paused.
 
- 
load- Specified by:
- loadin interface- Persistable
 
- 
onRemovepublic void onRemove()Description copied from interface:WaypointProviderCalled when the provider is removed from the NPC.- Specified by:
- onRemovein interface- WaypointProvider
 
- 
onSpawnDescription copied from interface:WaypointProviderCalled when theNPCattached to this provider is spawned.- Specified by:
- onSpawnin interface- WaypointProvider
- Parameters:
- npc- The attached NPC
 
- 
save- Specified by:
- savein interface- Persistable
 
- 
setCachePathspublic void setCachePaths(boolean cachePaths) 
- 
setCyclepublic void setCycle(boolean cycle) 
- 
setPausedpublic void setPaused(boolean paused) Description copied from interface:WaypointProviderPauses waypoint execution.- Specified by:
- setPausedin interface- WaypointProvider
- Parameters:
- paused- Whether to pause waypoint execution.
 
- 
waypointsReturns the modifiable list of waypoints.- Specified by:
- waypointsin interface- WaypointProvider.EnumerableWaypointProvider
 
 
-