java.lang.Object
tfagaming.projects.minecraft.homestead.tools.java.Placeholder

public final class Placeholder extends Object
Class holder for creating placeholders for a string.
  • Constructor Details

    • Placeholder

      public Placeholder()
  • Method Details

    • add

      public Placeholder add(String key, Object value)
      Add a replacement string to the list of placeholders.
      Example usage:
      
        Placeholder plcd = new Placeholder();
        plcd.add("{message}", "Hello World!");
        plcd.add("{count}", 48);
        plcd.add("{current-state}", true);
        
    • build

      public Map<String,String> build()
      Convert the placeholder class to a Map<String, String>. If a placeholder value is null, it will replace it with "NULL" instead.