Class PlaceholderRegistry

java.lang.Object
tech.guilhermekaua.spigotboot.placeholder.registry.PlaceholderRegistry

public class PlaceholderRegistry extends Object
Discovers placeholder handlers and wires them into the PlaceholderAPI expansion.

The registry owns the discovery and registration flow: it scans for placeholder handler classes, resolves them as beans, builds their PlaceholderMetadata, publishes that metadata into the shared PlaceholderStore, and manages the PAPIExpansion lifecycle. It deliberately depends on the PlaceholderStore rather than holding the lookup table itself, so the expansion can read placeholders from the same store without creating a registry/expansion dependency cycle.

  • Constructor Details

    • PlaceholderRegistry

      public PlaceholderRegistry()
  • Method Details

    • initialize

      public void initialize()
      Discovers placeholder handlers, publishes their metadata into the PlaceholderStore, and registers the PlaceholderAPI expansion.
    • unregister

      public void unregister()
      Unregisters the PlaceholderAPI expansion (when registered) and clears the published placeholders.