Class APIHandler
java.lang.Object
me.angeschossen.chestprotect.api.handler.APIHandler
This class is not intended for direct usage and might change at any time.
-
Method Summary
Modifier and TypeMethodDescription@NotNull ChestProtectAPIgetAPI()Get the API implementation.Get the factory.static APIHandlerGet the singleton instance.static voidinit(@NotNull ChestProtectAPI api, @NotNull Factory factory) Initialize the handler.
-
Method Details
-
getAPI
Get the API implementation.- Returns:
- never null
-
getInstance
Get the singleton instance.- Returns:
- null if not yet initialized
-
getFactory
Get the factory.- Returns:
- never null after initialization
-
init
Initialize the handler. Called internally by ChestProtect on enable.- Parameters:
api- the API implementationfactory- the factory implementation- Throws:
IllegalStateException- if already initialized
-