Class Hologram

java.lang.Object
com.ultikits.ultitools.widgets.Hologram

public class Hologram extends Object
A multi-line hologram widget using invisible ArmorStands.

Creates floating text displays by spawning invisible, invulnerable ArmorStands with custom names. Each line is spaced 0.25 blocks apart vertically.

Example Usage:


 Hologram hologram = new Hologram("Line 1", "Line 2", "Line 3");
 ArmorStand[] stands = hologram.spawn(location);

 // To remove the hologram later
 for (ArmorStand stand : stands) {
     stand.remove();
 }
 

ArmorStand Properties:

  • Invisible
  • No gravity
  • Invulnerable
  • Custom name visible
Since:
6.0.0
Author:
wisdomme
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String[]
    The text lines to display, from top to bottom
  • Constructor Summary

    Constructors
    Constructor
    Description
    Hologram(String... lines)
    Creates a new hologram with the specified text lines.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.entity.ArmorStand[]
    spawn(org.bukkit.Location originLocation)
    Spawn the hologram.

    Methods inherited from class java.lang.Object

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

    • lines

      private final String[] lines
      The text lines to display, from top to bottom
  • Constructor Details

    • Hologram

      public Hologram(String... lines)
      Creates a new hologram with the specified text lines.
      Parameters:
      lines - the text lines to display, from top to bottom
  • Method Details

    • spawn

      public org.bukkit.entity.ArmorStand[] spawn(org.bukkit.Location originLocation)
      Spawn the hologram.
      Parameters:
      originLocation - The location you want to create the hologram.
      Returns:
      The spawned armor stands.You can use them to remove the hologram.