Package net.citizensnpcs.npc
Class CitizensTraitFactory
java.lang.Object
net.citizensnpcs.npc.CitizensTraitFactory
- All Implemented Interfaces:
- TraitFactory
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddDefaultTraits(NPC npc) Adds all default traits to a given NPC.voidderegisterTrait(TraitInfo info) Removes a trait.Returns all currently registered traits, including internal traits<T extends Trait>
 TGets a trait with the given class.<T extends Trait>
 TGets a trait with the given name.getTraitClass(String name) Gets theTraitclass with the given name, or null if not found.voidregisterTrait(TraitInfo info) Registers a trait using the given information.booleantrackStats(Trait trait) 
- 
Constructor Details- 
CitizensTraitFactory
 
- 
- 
Method Details- 
addDefaultTraitsDescription copied from interface:TraitFactoryAdds all default traits to a given NPC.- Specified by:
- addDefaultTraitsin interface- TraitFactory
- Parameters:
- npc- The NPC to add default traits to
 
- 
deregisterTraitDescription copied from interface:TraitFactoryRemoves a trait. This prevents a trait from being added to an NPC but does not remove existing traits from the NPCs.- Specified by:
- deregisterTraitin interface- TraitFactory
- Parameters:
- info- The TraitInfo to deregister
 
- 
getRegisteredTraitsDescription copied from interface:TraitFactoryReturns all currently registered traits, including internal traits- Specified by:
- getRegisteredTraitsin interface- TraitFactory
- Returns:
 
- 
getTraitDescription copied from interface:TraitFactoryGets a trait with the given class.- Specified by:
- getTraitin interface- TraitFactory
- Parameters:
- clazz- Class of the trait
- Returns:
- Trait with the given class
 
- 
getTraitDescription copied from interface:TraitFactoryGets a trait with the given name.- Specified by:
- getTraitin interface- TraitFactory
- Parameters:
- name- Name of the trait
- Returns:
- Trait with the given name
 
- 
getTraitClassDescription copied from interface:TraitFactoryGets theTraitclass with the given name, or null if not found.- Specified by:
- getTraitClassin interface- TraitFactory
- Parameters:
- name- The trait name
- Returns:
- The trait class
 
- 
registerTraitDescription copied from interface:TraitFactoryRegisters a trait using the given information.- Specified by:
- registerTraitin interface- TraitFactory
- Parameters:
- info- Registration information
 
- 
trackStats
 
-