Package com.maximde.hologramlib.hologram
Class Hologram<T extends Hologram<T>>
java.lang.Object
com.maximde.hologramlib.hologram.Hologram<T>
- Direct Known Subclasses:
BlockHologram
,ItemHologram
,TextHologram
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.bukkit.entity.Display.Billboard
protected int
protected boolean
protected me.tofaa.entitylib.wrapper.WrapperEntity
protected int
protected final com.github.retrooper.packetevents.protocol.entity.type.EntityType
protected final String
protected int
protected com.github.retrooper.packetevents.util.Quaternion4f
protected org.bukkit.Location
protected double
protected final RenderMode
The render mode determines which players can see the hologram: - NEARBY: Only players within viewing distance - ALL: All players on the server - VIEWER_LIST: Only specific players added as viewers - NONE: Hologram is not visible to any playersprotected com.github.retrooper.packetevents.util.Quaternion4f
protected org.joml.Vector3f
protected TaskHandle
protected int
protected org.joml.Vector3f
protected long
protected double
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
Hologram
(String id, RenderMode renderMode, com.github.retrooper.packetevents.protocol.entity.type.EntityType entityType) -
Method Summary
Modifier and TypeMethodDescriptionaddAllViewers
(List<org.bukkit.entity.Player> viewerList) void
addPassenger
(int... entityIDs) Attaches entities to this hologram.addViewer
(org.bukkit.entity.Player player) protected abstract me.tofaa.entitylib.meta.EntityMeta
void
attach
(int entityID, boolean persistent) Attaches this hologram to another entity, making it ride the target entity.protected abstract T
copy()
protected abstract T
int
Deprecated, for removal: This API element is subject to removal in a future version.getScale()
List<org.bukkit.entity.Player>
void
kill()
Deprecated.removeViewer
(org.bukkit.entity.Player player) protected T
self()
protected void
sendPacket
(com.github.retrooper.packetevents.wrapper.PacketWrapper<?> packet, List<org.bukkit.entity.Player> players) setBillboard
(org.bukkit.entity.Display.Billboard billboard) setBrightness
(int brightness) setBrightness
(int blockLight, int skyLight) setBrightness
(org.bukkit.entity.Display.Brightness brightness) setInterpolationDurationRotation
(int teleportDuration) Deprecated, for removal: This API element is subject to removal in a future version.setInterpolationDurationTransformation
(int interpolationDurationTransformation) setLeftRotation
(float x, float y, float z, float w) setMaxPlayerRenderDistanceSquared
(double maxPlayerRenderDistanceSquared) setRightRotation
(float x, float y, float z, float w) setScale
(float x, float y, float z) setTeleportDuration
(int teleportDuration) setTransformation
(org.bukkit.util.Transformation transformation) setTransformationMatrix
(org.joml.Matrix4f matrix4f) setTranslation
(float x, float y, float z) setTranslation
(Vector3F translation) setUpdateTaskPeriod
(long updateTaskPeriod) Period in ticks between updates of the hologram's viewer list.setViewRange
(double viewRange) teleport
(org.bukkit.Location newLocation) protected com.github.retrooper.packetevents.util.Vector3f
toVector3f
(org.joml.Vector3f vector) update()
Updates the set properties for the entity (shows them to the players).protected void
validateId
(String id)
-
Field Details
-
location
protected org.bukkit.Location location -
dead
protected boolean dead -
updateTaskPeriod
protected long updateTaskPeriod -
maxPlayerRenderDistanceSquared
protected double maxPlayerRenderDistanceSquared -
billboard
protected org.bukkit.entity.Display.Billboard billboard -
teleportDuration
protected int teleportDuration -
interpolationDurationTransformation
protected int interpolationDurationTransformation -
viewRange
protected double viewRange -
brightness
protected int brightness -
id
-
entityID
protected int entityID -
scale
protected org.joml.Vector3f scale -
translation
protected org.joml.Vector3f translation -
rightRotation
protected com.github.retrooper.packetevents.util.Quaternion4f rightRotation -
leftRotation
protected com.github.retrooper.packetevents.util.Quaternion4f leftRotation -
renderMode
The render mode determines which players can see the hologram: - NEARBY: Only players within viewing distance - ALL: All players on the server - VIEWER_LIST: Only specific players added as viewers - NONE: Hologram is not visible to any players -
entityType
protected final com.github.retrooper.packetevents.protocol.entity.type.EntityType entityType -
task
-
entity
protected me.tofaa.entitylib.wrapper.WrapperEntity entity
-
-
Constructor Details
-
Hologram
protected Hologram(String id, com.github.retrooper.packetevents.protocol.entity.type.EntityType entityType) -
Hologram
protected Hologram(String id, RenderMode renderMode, com.github.retrooper.packetevents.protocol.entity.type.EntityType entityType)
-
-
Method Details
-
self
-
update
Updates the set properties for the entity (shows them to the players). Should be called after making any changes to the hologram object. -
validateId
-
toVector3f
protected com.github.retrooper.packetevents.util.Vector3f toVector3f(org.joml.Vector3f vector) -
kill
Deprecated.THIS METHOD WILL BE MADE 'private' SOON! Use HologramManager#remove(Hologram) instead! -
teleport
-
applyMeta
protected abstract me.tofaa.entitylib.meta.EntityMeta applyMeta() -
getTranslation
-
getScale
-
sendPacket
protected void sendPacket(com.github.retrooper.packetevents.wrapper.PacketWrapper<?> packet, List<org.bukkit.entity.Player> players) -
attach
public void attach(int entityID, boolean persistent) Attaches this hologram to another entity, making it ride the target entity.- Parameters:
entityID
- The entity ID to attach the hologram topersistent
- If the hologram should be re-attached automatically or not TODO
-
addPassenger
public void addPassenger(int... entityIDs) Attaches entities to this hologram.- Parameters:
entityIDs
- The passengers
-
getPassengers
-
setUpdateTaskPeriod
Period in ticks between updates of the hologram's viewer list. Lower values mean more frequent updates but higher server load. Default is 60 ticks (3 seconds). -
setMaxPlayerRenderDistanceSquared
-
setBillboard
-
getInterpolationDurationRotation
Deprecated, for removal: This API element is subject to removal in a future version. -
setInterpolationDurationRotation
Deprecated, for removal: This API element is subject to removal in a future version. -
setTeleportDuration
-
setInterpolationDurationTransformation
-
setViewRange
-
setLeftRotation
-
setRightRotation
-
setTranslation
-
setTranslation
-
setTransformation
-
setTransformationMatrix
-
setBrightness
-
setBrightness
-
setBrightness
-
addViewer
-
removeViewer
-
getViewerUUIDs
-
getViewers
-
addAllViewers
-
removeAllViewers
-
setScale
-
setScale
-
copy
-
copy
-