Class Hologram

java.lang.Object
com.bencodez.advancedcore.api.hologram.Hologram

public class Hologram extends Object
Represents a hologram using armor stands.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Hologram(org.bukkit.Location loc, String name)
    Creates a new hologram at the specified location with the given name.
    Hologram(org.bukkit.Location loc, String name, boolean marker)
    Creates a new hologram with marker setting.
    Hologram(org.bukkit.Location loc, String name, boolean marker, boolean glowing)
    Creates a new hologram with marker and glowing settings.
    Hologram(org.bukkit.Location loc, String name, boolean marker, boolean glowing, org.bukkit.NamespacedKey key, int value)
    Creates a new hologram with persistent data.
    Hologram(org.bukkit.Location loc, String name, boolean marker, boolean glowing, org.bukkit.NamespacedKey key, int value, String str, Object value1)
    Creates a new hologram with persistent data and entity metadata.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.persistence.PersistentDataContainer
    Gets the persistent data container of the armor stand.
    void
    glow(boolean value)
    Sets the glowing state of the hologram.
    boolean
    Checks if the hologram is alive.
    boolean
    Checks if the hologram has been created.
    void
    Kills and removes the hologram.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Hologram

      public Hologram(org.bukkit.Location loc, String name)
      Creates a new hologram at the specified location with the given name.
      Parameters:
      loc - the location
      name - the hologram name
    • Hologram

      public Hologram(org.bukkit.Location loc, String name, boolean marker)
      Creates a new hologram with marker setting.
      Parameters:
      loc - the location
      name - the hologram name
      marker - whether to set as marker
    • Hologram

      public Hologram(org.bukkit.Location loc, String name, boolean marker, boolean glowing)
      Creates a new hologram with marker and glowing settings.
      Parameters:
      loc - the location
      name - the hologram name
      marker - whether to set as marker
      glowing - whether the hologram should glow
    • Hologram

      public Hologram(org.bukkit.Location loc, String name, boolean marker, boolean glowing, org.bukkit.NamespacedKey key, int value)
      Creates a new hologram with persistent data.
      Parameters:
      loc - the location
      name - the hologram name
      marker - whether to set as marker
      glowing - whether the hologram should glow
      key - the namespaced key for persistent data
      value - the persistent data value
    • Hologram

      public Hologram(org.bukkit.Location loc, String name, boolean marker, boolean glowing, org.bukkit.NamespacedKey key, int value, String str, Object value1)
      Creates a new hologram with persistent data and entity metadata.
      Parameters:
      loc - the location
      name - the hologram name
      marker - whether to set as marker
      glowing - whether the hologram should glow
      key - the namespaced key for persistent data
      value - the persistent data value
      str - the metadata key
      value1 - the metadata value
  • Method Details

    • getPersistentDataHolder

      public org.bukkit.persistence.PersistentDataContainer getPersistentDataHolder()
      Gets the persistent data container of the armor stand.
      Returns:
      the persistent data container
    • glow

      public void glow(boolean value)
      Sets the glowing state of the hologram.
      Parameters:
      value - whether the hologram should glow
    • isAlive

      public boolean isAlive()
      Checks if the hologram is alive.
      Returns:
      true if the armor stand is not dead, false otherwise
    • isCreated

      public boolean isCreated()
      Checks if the hologram has been created.
      Returns:
      true if the armor stand exists, false otherwise
    • kill

      public void kill()
      Kills and removes the hologram.