Class Lore.Builder

java.lang.Object
io.github.somesourcecode.someguiapi.scene.Lore.Builder
Enclosing class:
Lore

public static class Lore.Builder extends Object
The builder for the Lore class. Allows for easy construction of lore objects, by making use of a fluent API.
  • Method Details

    • lines

      public Lore.Builder lines(List<net.kyori.adventure.text.Component> lines)
      Sets the lines of the lore. Previous lines will be removed.
      Parameters:
      lines - the lines of the lore
      Returns:
      the builder for method chaining
    • lines

      public Lore.Builder lines(net.kyori.adventure.text.Component... lines)
      Sets the lines of the lore. Previous lines will be removed.
      Parameters:
      lines - the lines of the lore
      Returns:
      the builder for method chaining
    • line

      public Lore.Builder line(int index, net.kyori.adventure.text.Component line)
      Replaces the line at the specified index with the given line.
      Parameters:
      index - the index of the line to replace
      line - the line to replace the existing line with
      Returns:
      the builder for method chaining
    • insertLine

      public Lore.Builder insertLine(int index, net.kyori.adventure.text.Component line)
      Inserts the given line at the specified index.
      Parameters:
      index - the index to insert the line at
      line - the line to insert
      Returns:
      the builder for method chaining
    • line

      public Lore.Builder line(net.kyori.adventure.text.Component line)
      Appends the given line to the end of the lore.
      Parameters:
      line - the line to append
      Returns:
      the builder for method chaining
    • blankLine

      public Lore.Builder blankLine(int index)
      Sets the line at the specified index to a blank line.
      Parameters:
      index - the index of the line to set to a blank line
      Returns:
      the builder for method chaining
    • insertBlankLine

      public Lore.Builder insertBlankLine(int index)
      Inserts a blank line at the specified index.
      Parameters:
      index - the index to insert the blank line at
      Returns:
      the builder for method chaining
    • blankLine

      public Lore.Builder blankLine()
      Appends a blank line to the end of the lore.
      Returns:
      the builder for method chaining
    • removeLine

      public Lore.Builder removeLine(int index)
      Removes the line at the specified index.
      Parameters:
      index - the index of the line to remove
      Returns:
      the builder for method chaining
    • clear

      public Lore.Builder clear()
      Clears all lines from the lore.
      Returns:
      the builder for method chaining
    • build

      public Lore build()
      Builds the lore object.
      Returns:
      the lore object