public class GuidedWaypointProvider extends Object implements WaypointProvider.EnumerableWaypointProvider
Waypoint
s 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.WaypointProvider.EnumerableWaypointProvider
Constructor and Description |
---|
GuidedWaypointProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addHelperWaypoint(Waypoint helper) |
void |
addHelperWaypoints(Collection<Waypoint> helper) |
void |
addWaypoint(Waypoint waypoint) |
void |
addWaypoints(Collection<Waypoint> waypoint) |
WaypointEditor |
createEditor(org.bukkit.command.CommandSender sender,
CommandContext args)
Creates an
WaypointEditor with the given CommandSender . |
boolean |
isPaused()
Returns whether this provider has paused execution of waypoints.
|
void |
load(DataKey key) |
void |
onRemove()
Called when the provider is removed from the NPC.
|
void |
onSpawn(NPC npc)
Called when the
NPC attached to this provider is spawned. |
void |
save(DataKey key) |
void |
setPaused(boolean paused)
Pauses waypoint execution.
|
Iterable<Waypoint> |
waypoints()
Returns available and helper waypoints.
|
public void addHelperWaypoint(Waypoint helper)
public void addHelperWaypoints(Collection<Waypoint> helper)
public void addWaypoint(Waypoint waypoint)
public void addWaypoints(Collection<Waypoint> waypoint)
public WaypointEditor createEditor(org.bukkit.command.CommandSender sender, CommandContext args)
WaypointProvider
WaypointEditor
with the given CommandSender
.createEditor
in interface WaypointProvider
sender
- The player to link the editor withpublic boolean isPaused()
WaypointProvider
isPaused
in interface WaypointProvider
public void load(DataKey key)
load
in interface Persistable
public void onRemove()
WaypointProvider
onRemove
in interface WaypointProvider
public void onSpawn(NPC npc)
WaypointProvider
NPC
attached to this provider is spawned.onSpawn
in interface WaypointProvider
npc
- The attached NPCpublic void save(DataKey key)
save
in interface Persistable
public void setPaused(boolean paused)
WaypointProvider
setPaused
in interface WaypointProvider
paused
- Whether to pause waypoint execution.public Iterable<Waypoint> waypoints()
waypoints
in interface WaypointProvider.EnumerableWaypointProvider
Copyright © 2021. All rights reserved.