Package me.yleoft.zAPI.utils
Class StringUtils
java.lang.Object
me.yleoft.zAPI.utils.StringUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringapplyOwnPlaceholders(@Nullable org.bukkit.OfflinePlayer p, @NotNull String string) Apply placeholders to a string for a specific player using your own placeholder expansion.static StringapplyPlaceholders(@Nullable org.bukkit.OfflinePlayer p, @NotNull String string) Apply placeholders to a string for a specific player.static StringApply color codes to a string.static StringApply hex color codes to a string.static booleanstartsWithIgnoreCase(String full, String prefix) static StringTransform a string by applying color codes and hex codes.static StringTransform a string by applying color codes, hex codes and placeholders.
-
Constructor Details
-
StringUtils
public StringUtils()
-
-
Method Details
-
startsWithIgnoreCase
-
transform
public static String transform(@Nullable @Nullable org.bukkit.OfflinePlayer p, @NotNull @NotNull String string) Transform a string by applying color codes, hex codes and placeholders.- Parameters:
p- The player to apply placeholders forstring- The string to transform- Returns:
- The transformed string
-
transform
Transform a string by applying color codes and hex codes.- Parameters:
string- The string to transform- Returns:
- The transformed string
-
applyPlaceholders
public static String applyPlaceholders(@Nullable @Nullable org.bukkit.OfflinePlayer p, @NotNull @NotNull String string) Apply placeholders to a string for a specific player.- Parameters:
p- The player to apply placeholders forstring- The string to apply placeholders to- Returns:
- The string with placeholders applied
-
applyOwnPlaceholders
public static String applyOwnPlaceholders(@Nullable @Nullable org.bukkit.OfflinePlayer p, @NotNull @NotNull String string) Apply placeholders to a string for a specific player using your own placeholder expansion.- Parameters:
p- The player to apply placeholders forstring- The string to apply placeholders to- Returns:
- The string with placeholders applied
-
color
Apply color codes to a string.- Parameters:
string- The string to apply color codes to- Returns:
- The string with color codes applied
-
hex
Apply hex color codes to a string.- Parameters:
string- The string to apply hex color codes to- Returns:
- The string with hex color codes applied
-