Package net.citizensnpcs.trait
Class BoundingBoxTrait
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.BoundingBoxTrait
- All Implemented Interfaces:
Runnable
,Supplier<BoundingBox>
,Listener
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget()
void
Called just before the attachedNPC
is despawned.void
onRemove()
Called when a trait is removed from the attachedNPC
.void
onSpawn()
Called when anNPC
is spawned.void
void
setHeight
(float height) void
setScale
(float scale) void
setWidth
(float width)
-
Constructor Details
-
BoundingBoxTrait
public BoundingBoxTrait()
-
-
Method Details
-
get
- Specified by:
get
in interfaceSupplier<BoundingBox>
-
getAdjustedBoundingBox
-
onDespawn
public void onDespawn()Description copied from class:Trait
Called just before the attachedNPC
is despawned.NPC.getEntity()
will be non-null. -
onRemove
public void onRemove()Description copied from class:Trait
Called when a trait is removed from the attachedNPC
. -
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. -
setBoundingBoxFunction
-
setHeight
public void setHeight(float height) -
setScale
public void setScale(float scale) -
setWidth
public void setWidth(float width)
-