Package net.citizensnpcs.trait
Class VillagerProfession
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.VillagerProfession
Persists the Villager profession metadata.
- See Also:
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidLoads a trait.voidonSpawn()Called when anNPCis spawned.voidSaves a trait.voidsetProfession(Villager.Profession profession) toString()
- 
Constructor Details- 
VillagerProfessionpublic VillagerProfession()
 
- 
- 
Method Details- 
getProfession
- 
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
 
- 
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.
- 
setProfession
- 
toString
 
-