Package net.citizensnpcs.trait
Class Age
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.Age
- See Also:
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddescribe(CommandSender sender) Send a brief description of the current state of the trait to the suppliedCommandSender.intgetAge()voidonSpawn()Called when anNPCis spawned.voidrun()Called every tick if overridden.voidsetAge(int age) voidsetLocked(boolean locked) booleantoggle()Toggles the age lock variable and returns whether the age is currently locked.toString()
- 
Constructor Details- 
Agepublic Age()
 
- 
- 
Method Details- 
describeSend a brief description of the current state of the trait to the suppliedCommandSender.
- 
getAgepublic int getAge()
- 
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.
- 
runpublic void run()Description copied from class:TraitCalled every tick if overridden.
- 
setAgepublic void setAge(int age) 
- 
setLockedpublic void setLocked(boolean locked) 
- 
togglepublic boolean toggle()Toggles the age lock variable and returns whether the age is currently locked.
- 
toString
 
-