StringUtil

public class StringUtil

Constructors

Link copied to clipboard
public void StringUtil()

Properties

Link copied to clipboard
public final static LegacyComponentSerializer LEGACY_SERIALIZER
Link copied to clipboard
public final static LegacyComponentSerializer LEGACY_SERIALIZER_AMPERSAND
Link copied to clipboard
public final static MiniMessage MINI_MESSAGE

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 convertToTitleCase(String input)
Converts a string from UPPER_CASE_WITH_UNDERSCORES to Title Case.
Link copied to clipboard
public static String legacyToMiniMessage(String legacy)
Convert legacy color codes (&c) 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(String string)
Replace all PlaceholderAPI placeholders with MiniMessage tags in a string.
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.
Link copied to clipboard
public static void sendComponent(CommandSender sender, Component component)
Link copied to clipboard
public static long shortTimeToSeconds(String shortTime, long minSeconds, long defaultSeconds)
Convert short time to seconds.