Package com.thewinterframework.component
Class ComponentJoiner
java.lang.Object
com.thewinterframework.component.ComponentJoiner
Utility class for joining components with a delimiter.
-
Constructor Summary
ConstructorsConstructorDescriptionComponentJoiner(@NotNull net.kyori.adventure.text.Component delimiter) Creates a new component joiner with the given delimiter. -
Method Summary
-
Constructor Details
-
ComponentJoiner
public ComponentJoiner(@NotNull @NotNull net.kyori.adventure.text.Component delimiter) Creates a new component joiner with the given delimiter.- Parameters:
delimiter- The delimiter to use.
-
-
Method Details
-
newLine
public static net.kyori.adventure.text.Component newLine(@NotNull @NotNull List<net.kyori.adventure.text.Component> components) Creates a new component joiner with newlines as the delimiter.- Parameters:
components- The components to join.
-
append
Appends a component to the joiner.- Parameters:
component- The component to append.- Returns:
- The component joiner.
-
component
public net.kyori.adventure.text.Component component()- Returns:
- The joined component.
-
isEmpty
public boolean isEmpty()- Returns:
- Whether the joiner is empty.
-