Class ContextParagraph
java.lang.Object
io.github.somesourcecode.someguiapi.scene.lore.ContextParagraph
- All Implemented Interfaces:
Paragraph,ReloadableParagraph
The basic implementation of a
ReloadableParagraph.- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new empty context paragraph.ContextParagraph(java.util.function.Function<RenderContext, Paragraph> contentGenerator) Constructs a new context paragraph with the given content generator. -
Method Summary
Modifier and TypeMethodDescriptionList<net.kyori.adventure.text.Component>getLines()Returns a list representing the lines of the paragraph.voidreload(RenderContext context) Reloads the paragraph with the given context.setContentGenerator(java.util.function.Function<RenderContext, Paragraph> paragraphGenerator) Sets the content generator of the paragraph.
-
Constructor Details
-
ContextParagraph
public ContextParagraph()Constructs a new empty context paragraph.- Since:
- 2.0.0
-
ContextParagraph
Constructs a new context paragraph with the given content generator.- Parameters:
contentGenerator- the content generator- Since:
- 2.0.0
-
-
Method Details
-
setContentGenerator
public ContextParagraph setContentGenerator(java.util.function.Function<RenderContext, Paragraph> paragraphGenerator) Sets the content generator of the paragraph.- Parameters:
paragraphGenerator- the content generator- Returns:
- the paragraph for method chaining
- Since:
- 2.0.0
-
reload
Description copied from interface:ReloadableParagraphReloads the paragraph with the given context.- Specified by:
reloadin interfaceReloadableParagraph- Parameters:
context- the context in which the paragraph is rendered
-
getLines
Description copied from interface:ParagraphReturns a list representing the lines of the paragraph.
-