Class Lore.Builder
java.lang.Object
io.github.somesourcecode.someguiapi.scene.Lore.Builder
- Enclosing class:
- Lore
The builder for the Lore class. Allows for easy construction of lore objects,
by making use of a fluent API.
-
Method Summary
Modifier and TypeMethodDescriptionAppends a blank line to the end of the lore.blankLine(int index) Sets the line at the specified index to a blank line.build()Builds the lore object.clear()Clears all lines from the lore.insertBlankLine(int index) Inserts a blank line at the specified index.insertLine(int index, net.kyori.adventure.text.Component line) Inserts the given line at the specified index.line(int index, net.kyori.adventure.text.Component line) Replaces the line at the specified index with the given line.line(net.kyori.adventure.text.Component line) Appends the given line to the end of the lore.Sets the lines of the lore.lines(net.kyori.adventure.text.Component... lines) Sets the lines of the lore.removeLine(int index) Removes the line at the specified index.
-
Method Details
-
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
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
Replaces the line at the specified index with the given line.- Parameters:
index- the index of the line to replaceline- the line to replace the existing line with- Returns:
- the builder for method chaining
-
insertLine
Inserts the given line at the specified index.- Parameters:
index- the index to insert the line atline- the line to insert- Returns:
- the builder for method chaining
-
line
Appends the given line to the end of the lore.- Parameters:
line- the line to append- Returns:
- the builder for method chaining
-
blankLine
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
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
Appends a blank line to the end of the lore.- Returns:
- the builder for method chaining
-
removeLine
Removes the line at the specified index.- Parameters:
index- the index of the line to remove- Returns:
- the builder for method chaining
-
clear
Clears all lines from the lore.- Returns:
- the builder for method chaining
-
build
Builds the lore object.- Returns:
- the lore object
-