Package net.citizensnpcs.trait
Class AttributeTrait
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.AttributeTrait
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValue
(Attribute attribute) boolean
hasAttribute
(Attribute attribute) void
onSpawn()
Called when anNPC
is spawned.void
setAttributeValue
(Attribute attribute, double value) void
setDefaultAttribute
(Attribute attribute)
-
Constructor Details
-
AttributeTrait
public AttributeTrait()
-
-
Method Details
-
getAttributeValue
-
hasAttribute
-
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. -
setAttributeValue
-
setDefaultAttribute
-