Class CaptionUtility
java.lang.Object
com.plotsquared.core.configuration.caption.CaptionUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
format
(@Nullable PlotPlayer<?> recipient, @NonNull String message) Format a chat messagestatic String
formatRaw
(PlotPlayer<?> recipient, String message) Format a chat message but keep the formatting keysstatic String
stripClickEvents
(@NonNull PlotFlag<?, ?> flag, @NonNull String miniMessageString) Strips configured MiniMessage click events from a plot flag value.static String
stripClickEvents
(@NonNull String miniMessageString) Strips configured click events from a MiniMessage string.
-
Constructor Details
-
CaptionUtility
public CaptionUtility()
-
-
Method Details
-
formatRaw
Format a chat message but keep the formatting keys- Parameters:
recipient
- Message recipientmessage
- Message- Returns:
- Formatted message
-
format
Format a chat message- Parameters:
recipient
- Message recipientmessage
- Message- Returns:
- Formatted message
-
stripClickEvents
Strips configured click events from a MiniMessage string.- Parameters:
miniMessageString
- the message from which the specified click events should be removed from.- Returns:
- the string without the click events that are configured to be removed.
- Since:
- 6.0.10
- See Also:
-
stripClickEvents
public static String stripClickEvents(@NonNull PlotFlag<?, ?> flag, @NonNull String miniMessageString) Strips configured MiniMessage click events from a plot flag value. This is used before letting the string be parsed by the plot flag. This method works the same way asstripClickEvents(String)
but will only strip click events from messages that target flags that are meant to contain MiniMessage strings.- Parameters:
flag
- the flag the message is targeted for.miniMessageString
- the message from which the specified click events should be removed from.- Returns:
- the string without the click events that are configured to be removed.
- Since:
- 6.0.10
- See Also:
-