Package com.maximde.hologramlib.hologram
Class TextHologram
java.lang.Object
com.maximde.hologramlib.hologram.Hologram<TextHologram>
com.maximde.hologramlib.hologram.TextHologram
-
Nested Class Summary
Nested classes/interfaces inherited from class com.maximde.hologramlib.hologram.Hologram
Hologram.Internal
-
Field Summary
FieldsFields inherited from class com.maximde.hologramlib.hologram.Hologram
billboard, dead, entity, entityID, entityType, id, interpolationDurationTransformation, leftRotation, location, maxPlayerRenderDistanceSquared, renderMode, rightRotation, scale, task, teleportDuration, translation, updateTaskPeriod, viewRange
-
Constructor Summary
ConstructorsConstructorDescriptionTextHologram
(String id) Creates a new text hologram with the specified ID and nearby render mode.TextHologram
(String id, RenderMode renderMode) Creates a new text hologram with the specified ID and render mode. -
Method Summary
Modifier and TypeMethodDescriptionprotected me.tofaa.entitylib.meta.EntityMeta
protected TextHologram
copy()
Creates a copy of this hologram with a new ID.Creates a copy of this hologram with a new ID.getText()
net.kyori.adventure.text.Component
setMiniMessageText
(String text) setText
(net.kyori.adventure.text.Component component) Methods inherited from class com.maximde.hologramlib.hologram.Hologram
addAllViewers, addPassenger, addViewer, attach, getInterpolationDurationRotation, getPassengers, getScale, getTranslation, getViewers, getViewerUUIDs, kill, removeAllViewers, removeViewer, self, sendPacket, setBillboard, setInterpolationDurationRotation, setInterpolationDurationTransformation, setLeftRotation, setMaxPlayerRenderDistanceSquared, setRightRotation, setScale, setScale, setTeleportDuration, setTranslation, setTranslation, setUpdateTaskPeriod, setViewRange, teleport, toVector3f, update, validateId
-
Field Details
-
text
protected net.kyori.adventure.text.Component text
-
-
Constructor Details
-
TextHologram
Creates a new text hologram with the specified ID and render mode.- Parameters:
id
- Unique identifier for this hologram. Cannot contain spaces.renderMode
- Determines how and to whom the hologram is rendered- Throws:
IllegalArgumentException
- if id contains spaces
-
TextHologram
Creates a new text hologram with the specified ID and nearby render mode.- Parameters:
id
- Unique identifier for this hologram. Cannot contain spaces.- Throws:
IllegalArgumentException
- if id contains spaces
-
-
Method Details
-
copy
Creates a copy of this hologram with a new ID. The new ID will be the original ID with '_copy_' followed by a random number appended.- Specified by:
copy
in classHologram<TextHologram>
- Returns:
- A new TextHologram instance with copied properties
-
copy
Creates a copy of this hologram with a new ID.- Specified by:
copy
in classHologram<TextHologram>
- Returns:
- A new TextHologram instance with copied properties
-
applyMeta
protected me.tofaa.entitylib.meta.EntityMeta applyMeta()- Specified by:
applyMeta
in classHologram<TextHologram>
-
getTextAsComponent
public net.kyori.adventure.text.Component getTextAsComponent() -
getText
-
getTextWithoutColor
-
setText
-
setText
-
setMiniMessageText
-