Interface SpawnerGuiLayoutProvider


public interface SpawnerGuiLayoutProvider
Interface for plugins that want to provide per-spawner GUI layout overrides. Register an instance of this provider via SmartSpawnerAPI.setSpawnerLayoutProvider(SpawnerGuiLayoutProvider).

The provider is called every time a GUI is opened, allowing dynamic layout selection based on the spawner, player, or any external condition.

  • Method Summary

    Modifier and Type
    Method
    Description
    getLayout(SpawnerDataDTO spawner, org.bukkit.entity.Player player, GuiLayoutType type)
    Returns a custom layout for the given spawner and player, or null to use the default layout resolution (global registry → file-based).
    Returns a human-readable name for this provider, used for logging/debugging.
  • Method Details

    • getLayout

      GuiLayoutData getLayout(SpawnerDataDTO spawner, org.bukkit.entity.Player player, GuiLayoutType type)
      Returns a custom layout for the given spawner and player, or null to use the default layout resolution (global registry → file-based).
      Parameters:
      spawner - the spawner data (read-only)
      player - the player opening the GUI
      type - the type of GUI being opened
      Returns:
      a custom layout, or null to use the default
    • getProviderName

      String getProviderName()
      Returns a human-readable name for this provider, used for logging/debugging.
      Returns:
      the provider name