Package net.citizensnpcs.trait.waypoint
Class GuidedWaypointProvider
java.lang.Object
net.citizensnpcs.trait.waypoint.GuidedWaypointProvider
- All Implemented Interfaces:
Persistable,WaypointProvider,WaypointProvider.EnumerableWaypointProvider
public class GuidedWaypointProvider
extends Object
implements WaypointProvider.EnumerableWaypointProvider
Stores guided waypoint info. Guided waypoints are a list of
Waypoints that will be navigated between
randomly. Helper waypoints can be used to guide navigation between the random waypoints i.e. navigating between guide
waypoints. For example, you might have a "realistic" NPC that walks between houses using helper waypoints placed
along the roads.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.citizensnpcs.trait.waypoint.WaypointProvider
WaypointProvider.EnumerableWaypointProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDestination(Waypoint waypoint) voidaddDestinations(Collection<Waypoint> waypoint) voidvoidaddGuides(Collection<Waypoint> helper) createEditor(CommandSender sender, CommandContext args) Creates anWaypointEditorwith the givenCommandSender.booleanisPaused()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.voidvoidsetPaused(boolean paused) Pauses waypoint execution.Returns destination and guide waypoints.
-
Constructor Details
-
GuidedWaypointProvider
public GuidedWaypointProvider()
-
-
Method Details
-
addDestination
-
addDestinations
-
addGuide
-
addGuides
-
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
-
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
-
save
- Specified by:
savein interfacePersistable
-
setPaused
public void setPaused(boolean paused) Description copied from interface:WaypointProviderPauses waypoint execution.- Specified by:
setPausedin interfaceWaypointProvider- Parameters:
paused- Whether to pause waypoint execution.
-
waypoints
Returns destination and guide waypoints.- Specified by:
waypointsin interfaceWaypointProvider.EnumerableWaypointProvider
-