public class WanderWaypointProvider extends Object implements WaypointProvider, com.google.common.base.Supplier<ch.ethz.globis.phtree.PhTreeSolid<Boolean>>, com.google.common.base.Function<NPC,Location>
WaypointProvider.EnumerableWaypointProvider
Constructor and Description |
---|
WanderWaypointProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addRegionCentre(Location centre) |
void |
addRegionCentres(Collection<Location> centre) |
Location |
apply(NPC npc) |
WaypointEditor |
createEditor(CommandSender sender,
CommandContext args)
Creates an
WaypointEditor with the given CommandSender . |
ch.ethz.globis.phtree.PhTreeSolid<Boolean> |
get() |
List<Location> |
getRegionCentres() |
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 |
removeRegionCentre(Location centre) |
void |
removeRegionCentres(Collection<Location> centre) |
void |
save(DataKey key) |
void |
setPaused(boolean paused)
Pauses waypoint execution.
|
public void addRegionCentre(Location centre)
public void addRegionCentres(Collection<Location> centre)
public WaypointEditor createEditor(CommandSender sender, CommandContext args)
WaypointProvider
WaypointEditor
with the given CommandSender
.createEditor
in interface WaypointProvider
sender
- The player to link the editor withpublic ch.ethz.globis.phtree.PhTreeSolid<Boolean> get()
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 removeRegionCentre(Location centre)
public void removeRegionCentres(Collection<Location> centre)
public void save(DataKey key)
save
in interface Persistable
public void setPaused(boolean paused)
WaypointProvider
setPaused
in interface WaypointProvider
paused
- Whether to pause waypoint execution.Copyright © 2019. All rights reserved.