Package net.citizensnpcs.trait.waypoint
Class Waypoints
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.waypoint.Waypoints
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddescribeProviders(CommandSender sender) Returns the currentWaypointProvider.getEditor(CommandSender player, CommandContext args) voidLoads a trait.voidonAttach()Called when the trait has been attached to anNPC.voidonSpawn()Called when anNPCis spawned.static voidregisterWaypointProvider(Class<? extends WaypointProvider> clazz, String name) Registers aWaypointProvider, which can be subsequently used by NPCs.voidSaves a trait.booleansetWaypointProvider(String name) Sets the currentWaypointProviderusing the given name.
- 
Constructor Details- 
Waypointspublic Waypoints()
 
- 
- 
Method Details- 
describeProviders
- 
getCurrentProviderReturns the currentWaypointProvider. May be null during initialisation.- Returns:
- The current provider
 
- 
getCurrentProviderName- Returns:
- The current provider name
 
- 
getEditor
- 
loadDescription copied from class:TraitLoads a trait.- Overrides:
- loadin class- Trait
- Parameters:
- key- DataKey to load from
- Throws:
- NPCLoadException- Thrown if this trait failed to load properly
 
- 
onAttachpublic void onAttach()Description copied from class:Trait
- 
onSpawnpublic void onSpawn()Description copied from class:TraitCalled when anNPCis spawned.NPC.getEntity()will return null until this is called. This is also called onAttach when the NPC is already spawned.
- 
saveDescription copied from class:TraitSaves a trait.
- 
setWaypointProviderSets the currentWaypointProviderusing the given name.- Parameters:
- name- The name of the waypoint provider, registered using- registerWaypointProvider(Class, String)
- Returns:
- Whether the operation succeeded
 
- 
registerWaypointProviderRegisters aWaypointProvider, which can be subsequently used by NPCs.- Parameters:
- clazz- The class of the waypoint provider
- name- The name of the waypoint provider
 
 
-