Class TextHologram

java.lang.Object
com.maximde.hologramlib.hologram.Hologram<TextHologram>
com.maximde.hologramlib.hologram.TextHologram

public class TextHologram extends Hologram<TextHologram>
  • Field Details

    • text

      protected net.kyori.adventure.text.Component text
  • Constructor Details

    • TextHologram

      public TextHologram(String id, RenderMode renderMode)
      Creates a new text hologram with the specified ID and render mode.
      Parameters:
      id - Unique identifier for this hologram. Cannot contain spaces.
      renderMode - Determines how and to whom the hologram is rendered
      Throws:
      IllegalArgumentException - if id contains spaces
    • TextHologram

      public TextHologram(String id)
      Creates a new text hologram with the specified ID and nearby render mode.
      Parameters:
      id - Unique identifier for this hologram. Cannot contain spaces.
      Throws:
      IllegalArgumentException - if id contains spaces
  • Method Details

    • copy

      protected TextHologram copy()
      Creates a copy of this hologram with a new ID. The new ID will be the original ID with '_copy_' followed by a random number appended.
      Specified by:
      copy in class Hologram<TextHologram>
      Returns:
      A new TextHologram instance with copied properties
    • copy

      public TextHologram copy(String id)
      Creates a copy of this hologram with a new ID.
      Specified by:
      copy in class Hologram<TextHologram>
      Returns:
      A new TextHologram instance with copied properties
    • applyMeta

      protected me.tofaa.entitylib.meta.EntityMeta applyMeta()
      Specified by:
      applyMeta in class Hologram<TextHologram>
    • getTextAsComponent

      public net.kyori.adventure.text.Component getTextAsComponent()
    • getText

      public String getText()
    • getTextWithoutColor

      public String getTextWithoutColor()
    • setText

      public TextHologram setText(String text)
    • setText

      public TextHologram setText(net.kyori.adventure.text.Component component)
    • setMiniMessageText

      public TextHologram setMiniMessageText(String text)