Class CaptionUtility

java.lang.Object
com.plotsquared.core.configuration.caption.CaptionUtility

public class CaptionUtility extends Object
  • Constructor Details

  • Method Details

    • formatRaw

      public static String formatRaw(PlotPlayer<?> recipient, String message)
      Format a chat message but keep the formatting keys
      Parameters:
      recipient - Message recipient
      message - Message
      Returns:
      Formatted message
    • format

      public static String format(@Nullable PlotPlayer<?> recipient, @NonNull String message)
      Format a chat message
      Parameters:
      recipient - Message recipient
      message - Message
      Returns:
      Formatted message
    • stripClickEvents

      public static String stripClickEvents(@NonNull String miniMessageString)
      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 as stripClickEvents(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: