java.lang.Object
io.github.projectunified.unihologram.spigot.holographicdisplays.HDLegacyHologram
All Implemented Interfaces:
Hologram<org.bukkit.Location>, Visibility<org.bukkit.entity.Player>, PlayerVisibility

public class HDLegacyHologram extends Object implements Hologram<org.bukkit.Location>, PlayerVisibility
The legacy hologram for HolographicDisplays
  • Constructor Summary

    Constructors
    Constructor
    Description
    HDLegacyHologram(org.bukkit.plugin.Plugin plugin, String name, org.bukkit.Location location)
    Create a new hologram
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addLine(@NotNull HologramLine line)
    Add a line to the hologram
    void
    Clear the hologram
    getLine(int index)
    Get the line at the index
    @NotNull List<HologramLine>
    Get the lines of the hologram
    org.bukkit.Location
    Get the location of the hologram
    Get the name of the hologram
    void
    Hide the hologram from all viewers
    void
    hideTo(org.bukkit.entity.Player viewer)
    Hide the hologram from the viewer
    void
    Initialize the hologram.
    void
    insertLine(int index, @NotNull HologramLine line)
    Insert a line to the hologram at the index and move the rest down
    boolean
    Check if the hologram is initialized
    boolean
    isVisible(org.bukkit.entity.Player viewer)
    Check if the viewer can see the hologram
    void
    removeLine(int index)
    Remove a line at the index from the hologram
    void
    setLines(@NotNull List<HologramLine> lines)
    Set the lines of the hologram
    void
    setLocation(org.bukkit.Location location)
    Set the location of the hologram
    void
    Show the hologram to all viewers
    void
    showTo(org.bukkit.entity.Player viewer)
    Show the hologram to the viewer
    int
    Get the amount of lines

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.github.projectunified.unihologram.api.Hologram

    setLine
  • Constructor Details

    • HDLegacyHologram

      public HDLegacyHologram(org.bukkit.plugin.Plugin plugin, String name, org.bukkit.Location location)
      Create a new hologram
      Parameters:
      plugin - the plugin
      name - the name
      location - the location
  • Method Details

    • getLines

      @NotNull public @NotNull List<HologramLine> getLines()
      Description copied from interface: Hologram
      Get the lines of the hologram
      Specified by:
      getLines in interface Hologram<org.bukkit.Location>
      Returns:
      the lines
    • setLines

      public void setLines(@NotNull @NotNull List<HologramLine> lines)
      Description copied from interface: Hologram
      Set the lines of the hologram
      Specified by:
      setLines in interface Hologram<org.bukkit.Location>
      Parameters:
      lines - the lines
    • addLine

      public void addLine(@NotNull @NotNull HologramLine line)
      Description copied from interface: Hologram
      Add a line to the hologram
      Specified by:
      addLine in interface Hologram<org.bukkit.Location>
      Parameters:
      line - the line
    • insertLine

      public void insertLine(int index, @NotNull @NotNull HologramLine line)
      Description copied from interface: Hologram
      Insert a line to the hologram at the index and move the rest down
      Specified by:
      insertLine in interface Hologram<org.bukkit.Location>
      Parameters:
      index - the index
      line - the line
    • removeLine

      public void removeLine(int index)
      Description copied from interface: Hologram
      Remove a line at the index from the hologram
      Specified by:
      removeLine in interface Hologram<org.bukkit.Location>
      Parameters:
      index - the index
    • getLine

      public Optional<HologramLine> getLine(int index)
      Description copied from interface: Hologram
      Get the line at the index
      Specified by:
      getLine in interface Hologram<org.bukkit.Location>
      Parameters:
      index - the index
      Returns:
      the line
    • size

      public int size()
      Description copied from interface: Hologram
      Get the amount of lines
      Specified by:
      size in interface Hologram<org.bukkit.Location>
      Returns:
      the amount
    • getName

      public String getName()
      Description copied from interface: Hologram
      Get the name of the hologram
      Specified by:
      getName in interface Hologram<org.bukkit.Location>
      Returns:
      the name
    • init

      public void init()
      Description copied from interface: Hologram
      Initialize the hologram. Call this before using the hologram.
      Specified by:
      init in interface Hologram<org.bukkit.Location>
    • clear

      public void clear()
      Description copied from interface: Hologram
      Clear the hologram
      Specified by:
      clear in interface Hologram<org.bukkit.Location>
    • isInitialized

      public boolean isInitialized()
      Description copied from interface: Hologram
      Check if the hologram is initialized
      Specified by:
      isInitialized in interface Hologram<org.bukkit.Location>
      Returns:
      true if it is
    • getLocation

      public org.bukkit.Location getLocation()
      Description copied from interface: Hologram
      Get the location of the hologram
      Specified by:
      getLocation in interface Hologram<org.bukkit.Location>
      Returns:
      the location
    • setLocation

      public void setLocation(org.bukkit.Location location)
      Description copied from interface: Hologram
      Set the location of the hologram
      Specified by:
      setLocation in interface Hologram<org.bukkit.Location>
      Parameters:
      location - the location
    • isVisible

      public boolean isVisible(org.bukkit.entity.Player viewer)
      Description copied from interface: Visibility
      Check if the viewer can see the hologram
      Specified by:
      isVisible in interface Visibility<org.bukkit.entity.Player>
      Parameters:
      viewer - the viewer
      Returns:
      true if the viewer can see the hologram
    • showAll

      public void showAll()
      Description copied from interface: Visibility
      Show the hologram to all viewers
      Specified by:
      showAll in interface Visibility<org.bukkit.entity.Player>
    • hideAll

      public void hideAll()
      Description copied from interface: Visibility
      Hide the hologram from all viewers
      Specified by:
      hideAll in interface Visibility<org.bukkit.entity.Player>
    • showTo

      public void showTo(org.bukkit.entity.Player viewer)
      Description copied from interface: Visibility
      Show the hologram to the viewer
      Specified by:
      showTo in interface Visibility<org.bukkit.entity.Player>
      Parameters:
      viewer - the viewer
    • hideTo

      public void hideTo(org.bukkit.entity.Player viewer)
      Description copied from interface: Visibility
      Hide the hologram from the viewer
      Specified by:
      hideTo in interface Visibility<org.bukkit.entity.Player>
      Parameters:
      viewer - the viewer