Class SoftPlaceholderAPI

java.lang.Object
com.kamikazejam.kamicommon.util.SoftPlaceholderAPI

public class SoftPlaceholderAPI extends Object
A utility class for soft PlaceholderAPI integration

This class will utilize PlaceholderAPI if it is present on the server, safely ignoring replacements if it is not.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull String
    setPlaceholders(@Nullable OfflinePlayer player, String s)
    Attempts to set placeholders in the given string for the given player if PlaceholderAPI is present
    If PlaceholderAPI is not present, the string is returned unchanged

    This method will warn in the console if PlaceholderAPI is not found and
    invalid reference
    Config#isWarnAboutPlaceholders()
    is true
    static @NotNull List<String>
    setPlaceholders(@Nullable OfflinePlayer player, @NotNull List<String> strings)
    Attempts to set placeholders in the given list of strings for the given player if PlaceholderAPI is present
    If PlaceholderAPI is not present, the list is returned unchanged

    This method will warn in the console if PlaceholderAPI is not found and
    invalid reference
    Config#isWarnAboutPlaceholders()
    is true

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SoftPlaceholderAPI

      public SoftPlaceholderAPI()
  • Method Details

    • setPlaceholders

      @NotNull public static @NotNull String setPlaceholders(@Nullable @Nullable OfflinePlayer player, String s)
      Attempts to set placeholders in the given string for the given player if PlaceholderAPI is present
      If PlaceholderAPI is not present, the string is returned unchanged

      This method will warn in the console if PlaceholderAPI is not found and
      invalid reference
      Config#isWarnAboutPlaceholders()
      is true
    • setPlaceholders

      @NotNull public static @NotNull List<String> setPlaceholders(@Nullable @Nullable OfflinePlayer player, @NotNull @NotNull List<String> strings)
      Attempts to set placeholders in the given list of strings for the given player if PlaceholderAPI is present
      If PlaceholderAPI is not present, the list is returned unchanged

      This method will warn in the console if PlaceholderAPI is not found and
      invalid reference
      Config#isWarnAboutPlaceholders()
      is true