java.lang.Object
io.github.somesourcecode.someguiapi.scene.lore.Lore

public class Lore extends Object
Represents the text which is shown below the title on hover.
Since:
2.0.0
  • Constructor Details

    • Lore

      public Lore()
  • Method Details

    • setDecoration

      public Lore setDecoration(net.kyori.adventure.text.format.TextDecoration decoration, boolean value)
      Adds a decoration override to the lore. Every line will have the given decoration applied.
      Parameters:
      decoration - the decoration
      value - the value
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • unsetDecoration

      public Lore unsetDecoration(net.kyori.adventure.text.format.TextDecoration decoration)
      Removes a decoration override from the lore.
      Parameters:
      decoration - the decoration
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • setParagraphs

      public Lore setParagraphs(List<Paragraph> paragraphs)
      Sets the paragraphs of the lore. Previous paragraphs will be overwritten.
      Parameters:
      paragraphs - the paragraphs
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • appendLine

      public Lore appendLine(net.kyori.adventure.text.Component line)
      Appends a line to the lore. This is a shorthand for appendParagraph(Paragraph) with a line paragraph.
      Parameters:
      line - the line to append
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • appendParagraph

      public Lore appendParagraph(Paragraph paragraph)
      Appends a paragraph to the lore.
      Parameters:
      paragraph - the paragraph to append
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • appendParagraphs

      public Lore appendParagraphs(Paragraph... paragraphs)
      Appends multiple paragraphs to the lore.
      Parameters:
      paragraphs - the paragraphs to append
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • appendParagraphs

      public Lore appendParagraphs(List<Paragraph> paragraphs)
      Appends multiple paragraphs to the lore.
      Parameters:
      paragraphs - the paragraphs to append
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • appendBlank

      public Lore appendBlank()
      Appends a blank line to the lore. This is a shorthand for appendParagraph(Paragraph) with a blank paragraph.
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • appendBlank

      public Lore appendBlank(int space)
      Appends a blank lines to the lore. The amount of lines is determined by the space parameter. This is a shorthand for appendParagraph(Paragraph) with a blank paragraph.
      Parameters:
      space - the amount of blank lines to append
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • appendDivider

      public Lore appendDivider(int length, net.kyori.adventure.text.format.NamedTextColor color)
      Appends a divider with the given length and color to the lore. This is a shorthand for appendParagraph(Paragraph) with a divider paragraph.
      Parameters:
      length - the length of the divider
      color - the color of the divider
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • appendDivider

      public Lore appendDivider(int length, net.kyori.adventure.text.format.NamedTextColor color, boolean bold)
      Appends a divider with the given length, color and boldness to the lore. This is a shorthand for appendParagraph(Paragraph) with a divider paragraph.
      Parameters:
      length - the length of the divider
      color - the color of the divider
      bold - whether the divider should be bold
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • clear

      public Lore clear()
      Removes all paragraphs from the lore.
      Returns:
      the lore for method chaining
      Since:
      2.0.0
    • generateLines

      public List<net.kyori.adventure.text.Component> generateLines(RenderContext context)
      Generates the lines of the lore. This is used for the rendering process.
      Parameters:
      context - the render context
      Returns:
      the lines of the lore
      Since:
      2.0.0