Adds new methods for outputting the result of the format builder
All checks were successful
KnarCraft/KnarLib/pipeline/head This commit looks good

This commit is contained in:
2025-09-13 17:43:38 +02:00
parent f3c010934b
commit 25b18a1670

View File

@@ -236,6 +236,24 @@ public class FormatBuilder {
FormatBuilder.stringFormatter.displayNeutralMessage(commandSender, getCurrentString()); FormatBuilder.stringFormatter.displayNeutralMessage(commandSender, getCurrentString());
} }
/**
* Displays the result a colored message with no prefix to the specified command sender
*
* @param commandSender <p>The recipient</p>
*/
public void displayColored(@NotNull CommandSender commandSender) {
commandSender.sendMessage(color().getCurrentString());
}
/**
* Displays the result as-is to the specified command sender
*
* @param commandSender <p>The recipient</p>
*/
public void displayRaw(@NotNull CommandSender commandSender) {
commandSender.sendMessage(getCurrentString());
}
@NotNull @NotNull
@Override @Override
public String toString() { public String toString() {