Class CommandMessageTemplates

java.lang.Object
tech.guilhermekaua.spigotboot.commands.message.CommandMessageTemplates

public final class CommandMessageTemplates extends Object
Interpolates {placeholder} tokens in command message templates.
  • Method Details

    • interpolate

      public static String interpolate(String template, Map<String,Object> placeholders)
      Replaces every {name} token in template with the string form of the matching value. Tokens with no matching value are left verbatim.
      Parameters:
      template - the template, may be null
      placeholders - the placeholder values, may be null
      Returns:
      the interpolated text, or an empty string when template is null