Package net.citizensnpcs.trait
Class Age
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.Age
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier 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
-
Age
public Age()
-
-
Method Details
-
describe
Send a brief description of the current state of the trait to the suppliedCommandSender. -
getAge
public int getAge() -
onSpawn
public 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. -
run
public void run()Description copied from class:TraitCalled every tick if overridden. -
setAge
public void setAge(int age) -
setLocked
public void setLocked(boolean locked) -
toggle
public boolean toggle()Toggles the age lock variable and returns whether the age is currently locked. -
toString
-