Modifier and Type | Class and Description |
---|---|
static class |
HologramTrait.HologramDirection |
Constructor and Description |
---|
HologramTrait() |
Modifier and Type | Method and Description |
---|---|
void |
addLine(String text) |
void |
clear() |
HologramTrait.HologramDirection |
getDirection() |
double |
getLineHeight() |
List<String> |
getLines() |
void |
onDespawn()
Called just before the attached
NPC is despawned. |
void |
onRemove()
Called when a trait is removed from the attached
NPC . |
void |
onSpawn()
Called when an
NPC is spawned. |
void |
removeLine(int idx) |
void |
run()
Called every tick if overridden.
|
void |
setDirection(HologramTrait.HologramDirection direction) |
void |
setLine(int idx,
String text) |
void |
setLineHeight(double height) |
public void addLine(String text)
public void clear()
public HologramTrait.HologramDirection getDirection()
public double getLineHeight()
public void onDespawn()
Trait
NPC
is despawned. NPC.getEntity()
will be non-null.public void onRemove()
Trait
NPC
.public void onSpawn()
Trait
NPC
is spawned. NPC.getEntity()
will return null until this is called. This is
also called onAttach when the NPC is already spawned.public void removeLine(int idx)
public void run()
Trait
public void setDirection(HologramTrait.HologramDirection direction)
public void setLine(int idx, String text)
public void setLineHeight(double height)
Copyright © 2021. All rights reserved.