public class LinearWaypointProvider extends Object implements WaypointProvider.EnumerableWaypointProvider
Waypoint
s to walk between.WaypointProvider.EnumerableWaypointProvider
Constructor and Description |
---|
LinearWaypointProvider() |
LinearWaypointProvider(NPC npc) |
Modifier and Type | Method and Description |
---|---|
WaypointEditor |
createEditor(org.bukkit.command.CommandSender sender,
CommandContext args)
Creates an
WaypointEditor with the given CommandSender . |
Waypoint |
getCurrentWaypoint() |
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 the modifiable list of waypoints.
|
public LinearWaypointProvider()
public LinearWaypointProvider(NPC npc)
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 Waypoint getCurrentWaypoint()
public 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.