Package net.citizensnpcs.trait
Class Age
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.Age
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
describe
(CommandSender sender) Send a brief description of the current state of the trait to the suppliedCommandSender
.int
getAge()
void
onSpawn()
Called when anNPC
is spawned.void
run()
Called every tick if overridden.void
setAge
(int age) void
setLocked
(boolean locked) boolean
toggle()
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:Trait
Called when anNPC
is 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:Trait
Called 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
-