Package net.citizensnpcs.npc
Class CitizensTraitFactory
java.lang.Object
net.citizensnpcs.npc.CitizensTraitFactory
- All Implemented Interfaces:
TraitFactory,Listener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetTemplateParser(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.voidonNPCCreate(NPCCreateEvent event) voidregisterTrait(TraitInfo info) Registers a trait using the given information.booleantrackStats(Trait trait)
-
Constructor Details
-
CitizensTraitFactory
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceTraitFactory
-
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
-
onNPCCreate
-
registerTrait
Description copied from interface:TraitFactoryRegisters a trait using the given information.- Specified by:
registerTraitin interfaceTraitFactory- Parameters:
info- Registration information
-
trackStats
-