Class Hologram<T extends Hologram<T>>

java.lang.Object
com.maximde.hologramlib.hologram.Hologram<T>
Direct Known Subclasses:
BlockHologram, ItemHologram, TextHologram

public abstract class Hologram<T extends Hologram<T>> extends Object
  • 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

      protected final String 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

      protected final RenderMode 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

      protected TaskHandle 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

      protected T self()
    • update

      public T 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

      protected void validateId(String id)
    • toVector3f

      protected com.github.retrooper.packetevents.util.Vector3f toVector3f(org.joml.Vector3f vector)
    • kill

      @Deprecated public void kill()
      Deprecated.
      THIS METHOD WILL BE MADE 'private' SOON! Use HologramManager#remove(Hologram) instead!
    • teleport

      public T teleport(org.bukkit.Location newLocation)
    • applyMeta

      protected abstract me.tofaa.entitylib.meta.EntityMeta applyMeta()
    • getTranslation

      public Vector3F getTranslation()
    • getScale

      public Vector3F 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 to
      persistent - 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

      public Set<Integer> getPassengers()
    • setUpdateTaskPeriod

      public T setUpdateTaskPeriod(long updateTaskPeriod)
      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

      public T setMaxPlayerRenderDistanceSquared(double maxPlayerRenderDistanceSquared)
    • setBillboard

      public T setBillboard(org.bukkit.entity.Display.Billboard billboard)
    • getInterpolationDurationRotation

      @Deprecated(forRemoval=true) public int getInterpolationDurationRotation()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setInterpolationDurationRotation

      @Deprecated(forRemoval=true) public T setInterpolationDurationRotation(int teleportDuration)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setTeleportDuration

      public T setTeleportDuration(int teleportDuration)
    • setInterpolationDurationTransformation

      public T setInterpolationDurationTransformation(int interpolationDurationTransformation)
    • setViewRange

      public T setViewRange(double viewRange)
    • setLeftRotation

      public T setLeftRotation(float x, float y, float z, float w)
    • setRightRotation

      public T setRightRotation(float x, float y, float z, float w)
    • setTranslation

      public T setTranslation(float x, float y, float z)
    • setTranslation

      public T setTranslation(Vector3F translation)
    • setTransformation

      public T setTransformation(org.bukkit.util.Transformation transformation)
    • setTransformationMatrix

      public T setTransformationMatrix(org.joml.Matrix4f matrix4f)
    • setBrightness

      public T setBrightness(int brightness)
    • setBrightness

      public T setBrightness(org.bukkit.entity.Display.Brightness brightness)
    • setBrightness

      public T setBrightness(int blockLight, int skyLight)
    • addViewer

      public T addViewer(org.bukkit.entity.Player player)
    • removeViewer

      public T removeViewer(org.bukkit.entity.Player player)
    • getViewerUUIDs

      public Set<UUID> getViewerUUIDs()
    • getViewers

      public List<org.bukkit.entity.Player> getViewers()
    • addAllViewers

      public T addAllViewers(List<org.bukkit.entity.Player> viewerList)
    • removeAllViewers

      public T removeAllViewers()
    • setScale

      public T setScale(float x, float y, float z)
    • setScale

      public T setScale(Vector3F scale)
    • copy

      protected abstract T copy()
    • copy

      protected abstract T copy(String id)