Class PapiPlaceholderApplier

java.lang.Object
tech.guilhermekaua.spigotboot.inventoryapi.placeholder.PapiPlaceholderApplier
All Implemented Interfaces:
PlaceholderApplier

public class PapiPlaceholderApplier extends Object implements PlaceholderApplier
PlaceholderApplier that delegates to PlaceholderAPI when the plugin is enabled at runtime. The auto-configuration installs this implementation when me.clip.placeholderapi.PlaceholderAPI is present on the classpath (checked via Class.forName in InventoryApiAutoConfiguration).

If the PlaceholderAPI plugin happens to be on the classpath but disabled at runtime (rare), apply(Player, String) returns the input unchanged.

  • Constructor Details

    • PapiPlaceholderApplier

      public PapiPlaceholderApplier()
  • Method Details

    • apply

      public String apply(@Nullable @Nullable org.bukkit.entity.Player player, @Nullable @Nullable String text)
      Description copied from interface: PlaceholderApplier
      Applies placeholders to a single text fragment.
      Specified by:
      apply in interface PlaceholderApplier
      Parameters:
      player - the viewer whose context should resolve player-scoped placeholders; may be null when no specific player is in scope
      text - the text to process; may be null
      Returns:
      the processed text, or the original input if text is null