Package net.citizensnpcs.api.trait
Class TraitInfo
java.lang.Object
net.citizensnpcs.api.trait.TraitInfo
Builds a trait.
- 
Method SummaryModifier and TypeMethodDescriptionvoidstatic TraitInfoConstructs a factory with the given trait class.booleanvoidregisterListener(Plugin plugin) boolean<T extends Trait>
 TwithSupplier(Supplier<? extends Trait> supplier) 
- 
Method Details- 
asDefaultTrait
- 
checkValidpublic void checkValid()
- 
getTraitClass
- 
getTraitName
- 
isDefaultTraitpublic boolean isDefaultTrait()
- 
optInToStats
- 
registerListener
- 
shouldTrackStatspublic boolean shouldTrackStats()
- 
tryCreateInstance
- 
withName
- 
withSupplier
- 
createConstructs a factory with the given trait class. The trait class must have a no-arguments constructor.- Parameters:
- trait- Class of the trait
- Returns:
- The created TraitInfo
- Throws:
- IllegalArgumentException- If the trait class does not have a no-arguments constructor
 
 
-