StringUtil

public class StringUtil

Utility class for strings.

Functions

Link copied to clipboard
@Nullable()
public static @Nullable() Color colorFromString(@Nullable() @Nullable() String color)
Parse a color from a string.
Link copied to clipboard
public static String legacyToMiniMessage(String legacy)
Convert legacy color codes to MiniMessage.
Link copied to clipboard
public static Array<BaseComponent> parse(CommandSender sender, String message, Array<TagResolver> placeholders)
Parse MiniMessage from a string, replace placeholders and replace and PlaceholderAPI placeholders and return a Spigot friendly component.
Link copied to clipboard
public static Component parseComponent(String message, Array<TagResolver> placeholders)
Parse MiniMessage from a string and replace placeholders.
public static Component parseComponent(CommandSender sender, String message, Array<TagResolver> placeholders)
Parse MiniMessage from a string, replace placeholders and replace and PlaceholderAPI placeholders.
Link copied to clipboard
public static String replacePlaceholders(CommandSender sender, String string)
Replace all PlaceholderAPI placeholders in a string.
Link copied to clipboard
public static void send(CommandSender sender, String message, Array<TagResolver> placeholders)
Parse MiniMessage from a string, replace placeholders and replace and PlaceholderAPI placeholders and send it to the sender.

Properties

Link copied to clipboard
public final static LegacyComponentSerializer LEGACY_SERIALIZER
The BungeeComponentSerializer instance used for parsing messages.
Link copied to clipboard
public final static MiniMessage MINI_MESSAGE
The MiniMessage instance used for parsing messages.