public class WanderWaypointProvider extends Object implements WaypointProvider, com.google.common.base.Supplier<net.citizensnpcs.api.util.cuboid.QuadTree>, com.google.common.base.Function<net.citizensnpcs.api.npc.NPC,Location>
WaypointProvider.EnumerableWaypointProvider
Constructor and Description |
---|
WanderWaypointProvider() |
Modifier and Type | Method and Description |
---|---|
Location |
apply(net.citizensnpcs.api.npc.NPC npc) |
WaypointEditor |
createEditor(CommandSender sender,
net.citizensnpcs.api.command.CommandContext args)
Creates an
WaypointEditor with the given CommandSender . |
net.citizensnpcs.api.util.cuboid.QuadTree |
get() |
List<Location> |
getRegionCentres() |
boolean |
isPaused()
Returns whether this provider has paused execution of waypoints.
|
void |
load(net.citizensnpcs.api.util.DataKey key) |
void |
onRemove()
Called when the provider is removed from the NPC.
|
void |
onSpawn(net.citizensnpcs.api.npc.NPC npc)
Called when the
NPC attached to this provider is spawned. |
void |
save(net.citizensnpcs.api.util.DataKey key) |
void |
setPaused(boolean paused)
Pauses waypoint execution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, compose, identity
public Location apply(net.citizensnpcs.api.npc.NPC npc)
apply
in interface java.util.function.Function<net.citizensnpcs.api.npc.NPC,Location>
public WaypointEditor createEditor(CommandSender sender, net.citizensnpcs.api.command.CommandContext args)
WaypointProvider
WaypointEditor
with the given CommandSender
.createEditor
in interface WaypointProvider
sender
- The player to link the editor withpublic net.citizensnpcs.api.util.cuboid.QuadTree get()
get
in interface java.util.function.Supplier<net.citizensnpcs.api.util.cuboid.QuadTree>
public boolean isPaused()
WaypointProvider
isPaused
in interface WaypointProvider
public void load(net.citizensnpcs.api.util.DataKey key)
load
in interface net.citizensnpcs.api.persistence.Persistable
public void onRemove()
WaypointProvider
onRemove
in interface WaypointProvider
public void onSpawn(net.citizensnpcs.api.npc.NPC npc)
WaypointProvider
NPC
attached to this provider is spawned.onSpawn
in interface WaypointProvider
npc
- The attached NPCpublic void save(net.citizensnpcs.api.util.DataKey key)
save
in interface net.citizensnpcs.api.persistence.Persistable
public void setPaused(boolean paused)
WaypointProvider
setPaused
in interface WaypointProvider
paused
- Whether to pause waypoint execution.Copyright © 2019. All rights reserved.