Interface Paragraph

All Known Subinterfaces:
ReloadableParagraph
All Known Implementing Classes:
BlankParagraph, ContextParagraph, DividerParagraph, LineParagraph, TextParagraph

public interface Paragraph
Represents a paragraph in a lore.
Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Constructs a new blank paragraph.
    blank(int space)
    Constructs a new blank paragraph with the given amount of blank lines.
    context(java.util.function.Function<RenderContext,Paragraph> paragraphGenerator)
    Constructs a new context paragraph with the given paragraph generator.
    Constructs a new divider paragraph.
    divider(int length)
    Constructs a new divider paragraph with the given length.
    divider(int length, net.kyori.adventure.text.format.NamedTextColor color)
    Constructs a new divider paragraph with the given length and color.
    divider(int length, net.kyori.adventure.text.format.NamedTextColor color, boolean bold)
    Constructs a new divider paragraph with the given length, color and boldness.
    List<net.kyori.adventure.text.Component>
    Returns a list representing the lines of the paragraph.
    line(net.kyori.adventure.text.Component line)
    Constructs a new line paragraph with the given line.
    text(net.kyori.adventure.text.Component content)
    Constructs a new text paragraph with the given content.
  • Method Details

    • getLines

      List<net.kyori.adventure.text.Component> getLines()
      Returns a list representing the lines of the paragraph.
      Returns:
      the lines of the paragraph
      Since:
      2.0.0
    • text

      static TextParagraph text(net.kyori.adventure.text.Component content)
      Constructs a new text paragraph with the given content.
      Parameters:
      content - the content of the paragraph
      Returns:
      the text paragraph
      Since:
      2.0.0
    • line

      static LineParagraph line(net.kyori.adventure.text.Component line)
      Constructs a new line paragraph with the given line.
      Parameters:
      line - the line of the paragraph
      Returns:
      the line paragraph
      Since:
      2.0.0
    • divider

      static DividerParagraph divider()
      Constructs a new divider paragraph.
      Returns:
      the divider paragraph
      Since:
      2.0.0
    • divider

      static DividerParagraph divider(int length)
      Constructs a new divider paragraph with the given length.
      Parameters:
      length - the length of the divider
      Returns:
      the divider paragraph
      Since:
      2.0.0
    • divider

      static DividerParagraph divider(int length, net.kyori.adventure.text.format.NamedTextColor color)
      Constructs a new divider paragraph with the given length and color.
      Parameters:
      length - the length of the divider
      color - the color of the divider
      Returns:
      the divider paragraph
      Since:
      2.0.0
    • divider

      static DividerParagraph divider(int length, net.kyori.adventure.text.format.NamedTextColor color, boolean bold)
      Constructs a new divider paragraph with the given length, color and boldness.
      Parameters:
      length - the length of the divider
      color - the color of the divider
      bold - whether the divider is bold
      Returns:
      the divider paragraph
      Since:
      2.0.0
    • blank

      static BlankParagraph blank()
      Constructs a new blank paragraph.
      Returns:
      the blank paragraph
      Since:
      2.0.0
    • blank

      static BlankParagraph blank(int space)
      Constructs a new blank paragraph with the given amount of blank lines.
      Parameters:
      space - the amount of blank lines
      Returns:
      the blank paragraph
      Since:
      2.0.0
    • context

      static ContextParagraph context(java.util.function.Function<RenderContext,Paragraph> paragraphGenerator)
      Constructs a new context paragraph with the given paragraph generator.
      Parameters:
      paragraphGenerator - the paragraph generator
      Returns:
      the context paragraph
      Since:
      2.0.0