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 TypeMethodDescriptionstatic BlankParagraphblank()Constructs a new blank paragraph.static BlankParagraphblank(int space) Constructs a new blank paragraph with the given amount of blank lines.static ContextParagraphcontext(java.util.function.Function<RenderContext, Paragraph> paragraphGenerator) Constructs a new context paragraph with the given paragraph generator.static DividerParagraphdivider()Constructs a new divider paragraph.static DividerParagraphdivider(int length) Constructs a new divider paragraph with the given length.static DividerParagraphdivider(int length, net.kyori.adventure.text.format.NamedTextColor color) Constructs a new divider paragraph with the given length and color.static DividerParagraphdivider(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>getLines()Returns a list representing the lines of the paragraph.static LineParagraphline(net.kyori.adventure.text.Component line) Constructs a new line paragraph with the given line.static TextParagraphtext(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
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
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
Constructs a new divider paragraph.- Returns:
- the divider paragraph
- Since:
- 2.0.0
-
divider
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
Constructs a new divider paragraph with the given length and color.- Parameters:
length- the length of the dividercolor- 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 dividercolor- the color of the dividerbold- whether the divider is bold- Returns:
- the divider paragraph
- Since:
- 2.0.0
-
blank
Constructs a new blank paragraph.- Returns:
- the blank paragraph
- Since:
- 2.0.0
-
blank
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
-