Interface EconomyApi


public interface EconomyApi
Manages the active economy provider and allows registering custom economy backends.
  • Method Details

    • getActiveProvider

      @Nullable @Nullable EconomyProvider getActiveProvider()
      Gets the currently active economy provider, if any.
      Returns:
      the active provider, or null if no providers are available
    • registerProvider

      void registerProvider(@NotNull @NotNull EconomyProvider provider)
      Registers a custom economy provider.
      Parameters:
      provider - the provider to register
    • setActiveProvider

      boolean setActiveProvider(@NotNull @NotNull String name)
      Sets the active economy provider by name.
      Parameters:
      name - the name of the provider
      Returns:
      true if the active provider was successfully changed, false otherwise
    • getProviders

      @NotNull @NotNull Collection<EconomyProvider> getProviders()
      Gets all registered economy providers.
      Returns:
      a collection of all registered providers