Class APIHandler

java.lang.Object
me.angeschossen.chestprotect.api.handler.APIHandler

public class APIHandler extends Object
This class is not intended for direct usage and might change at any time.
  • Method Details

    • getAPI

      @NotNull public @NotNull ChestProtectAPI getAPI()
      Get the API implementation.
      Returns:
      never null
    • getInstance

      public static APIHandler getInstance()
      Get the singleton instance.
      Returns:
      null if not yet initialized
    • getFactory

      public Factory getFactory()
      Get the factory.
      Returns:
      never null after initialization
    • init

      public static void init(@NotNull @NotNull ChestProtectAPI api, @NotNull @NotNull Factory factory)
      Initialize the handler. Called internally by ChestProtect on enable.
      Parameters:
      api - the API implementation
      factory - the factory implementation
      Throws:
      IllegalStateException - if already initialized