Class Lore
java.lang.Object
io.github.somesourcecode.someguiapi.scene.lore.Lore
Represents the text which is shown below the title on hover.
- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAppends a blank line to the lore.appendBlank(int space) Appends a blank lines to the lore.appendDivider(int length, net.kyori.adventure.text.format.NamedTextColor color) Appends a divider with the given length and color to the 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.appendLine(net.kyori.adventure.text.Component line) Appends a line to the lore.appendParagraph(Paragraph paragraph) Appends a paragraph to the lore.appendParagraphs(Paragraph... paragraphs) Appends multiple paragraphs to the lore.appendParagraphs(List<Paragraph> paragraphs) Appends multiple paragraphs to the lore.clear()Removes all paragraphs from the lore.List<net.kyori.adventure.text.Component>generateLines(RenderContext context) Generates the lines of the lore.setDecoration(net.kyori.adventure.text.format.TextDecoration decoration, boolean value) Adds a decoration override to the lore.setParagraphs(List<Paragraph> paragraphs) Sets the paragraphs of the lore.unsetDecoration(net.kyori.adventure.text.format.TextDecoration decoration) Removes a decoration override from the lore.
-
Constructor Details
-
Lore
public Lore()
-
-
Method Details
-
setDecoration
Adds a decoration override to the lore. Every line will have the given decoration applied.- Parameters:
decoration- the decorationvalue- the value- Returns:
- the lore for method chaining
- Since:
- 2.0.0
-
unsetDecoration
Removes a decoration override from the lore.- Parameters:
decoration- the decoration- Returns:
- the lore for method chaining
- Since:
- 2.0.0
-
setParagraphs
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
Appends a line to the lore. This is a shorthand forappendParagraph(Paragraph)with a line paragraph.- Parameters:
line- the line to append- Returns:
- the lore for method chaining
- Since:
- 2.0.0
-
appendParagraph
Appends a paragraph to the lore.- Parameters:
paragraph- the paragraph to append- Returns:
- the lore for method chaining
- Since:
- 2.0.0
-
appendParagraphs
Appends multiple paragraphs to the lore.- Parameters:
paragraphs- the paragraphs to append- Returns:
- the lore for method chaining
- Since:
- 2.0.0
-
appendParagraphs
Appends multiple paragraphs to the lore.- Parameters:
paragraphs- the paragraphs to append- Returns:
- the lore for method chaining
- Since:
- 2.0.0
-
appendBlank
Appends a blank line to the lore. This is a shorthand forappendParagraph(Paragraph)with a blank paragraph.- Returns:
- the lore for method chaining
- Since:
- 2.0.0
-
appendBlank
Appends a blank lines to the lore. The amount of lines is determined by the space parameter. This is a shorthand forappendParagraph(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
Appends a divider with the given length and color to the lore. This is a shorthand forappendParagraph(Paragraph)with a divider paragraph.- Parameters:
length- the length of the dividercolor- 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 forappendParagraph(Paragraph)with a divider paragraph.- Parameters:
length- the length of the dividercolor- the color of the dividerbold- whether the divider should be bold- Returns:
- the lore for method chaining
- Since:
- 2.0.0
-
clear
Removes all paragraphs from the lore.- Returns:
- the lore for method chaining
- Since:
- 2.0.0
-
generateLines
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
-