Package net.citizensnpcs.npc
Class CitizensTraitFactory
java.lang.Object
net.citizensnpcs.npc.CitizensTraitFactory
- All Implemented Interfaces:
 TraitFactory
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaultTraits(NPC npc) Adds all default traits to a given NPC.voidderegisterTrait(TraitInfo info) Removes a trait.getTemplateParser(String name) Gets theTraitTemplateParserwith the given trait name or null if not found.<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
- 
addDefaultTraits
Description copied from interface:TraitFactoryAdds all default traits to a given NPC.- Specified by:
 addDefaultTraitsin interfaceTraitFactory- Parameters:
 npc- The NPC to add default traits to
 - 
deregisterTrait
Description 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 interfaceTraitFactory- Parameters:
 info- The TraitInfo to deregister
 - 
getRegisteredTraits
- Specified by:
 getRegisteredTraitsin interfaceTraitFactory- Returns:
 - All currently registered traits, including internal traits.
 
 - 
getTemplateParser
Description copied from interface:TraitFactoryGets theTraitTemplateParserwith the given trait name or null if not found.- Specified by:
 getTemplateParserin interfaceTraitFactory- Parameters:
 name-- Returns:
 - the trait template parser
 
 - 
getTrait
Description copied from interface:TraitFactoryGets a trait with the given class.- Specified by:
 getTraitin interfaceTraitFactory- Parameters:
 clazz- Class of the trait- Returns:
 - Trait with the given class
 
 - 
getTrait
Description copied from interface:TraitFactoryGets a trait with the given name.- Specified by:
 getTraitin interfaceTraitFactory- Parameters:
 name- Name of the trait- Returns:
 - Trait with the given name
 
 - 
getTraitClass
Description copied from interface:TraitFactoryGets theTraitclass with the given name, or null if not found.- Specified by:
 getTraitClassin interfaceTraitFactory- Parameters:
 name- The trait name- Returns:
 - The trait class
 
 - 
registerTrait
Description copied from interface:TraitFactoryRegisters a trait using the given information.- Specified by:
 registerTraitin interfaceTraitFactory- Parameters:
 info- Registration information
 - 
trackStats
 
 -