Class StringUtils

java.lang.Object
dev.piglin.piglinworldapi.util.StringUtils

public class StringUtils extends Object
  • Constructor Details

    • StringUtils

      public StringUtils()
  • Method Details

    • replace

      public static String replace(String target, @Nullable @Nullable HashMap<String,​String> replacements, @Nullable @Nullable org.bukkit.OfflinePlayer player)
      Replaces the string with the specified replacements, PlaceholderAPI (if present) and colors including RGB and RGB gradients
      Parameters:
      target - The string
      replacements - The replacements. {key} will be replaced with value
      player - The player to set placeholder against (if using PlaceholderAPI)
      Returns:
      String with all placeholders set and translated colors (including RGB)