Package org.mvplugins.multiverse.portals
Class MultiversePortalsApi
java.lang.Object
org.mvplugins.multiverse.portals.MultiversePortalsApi
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull MultiversePortalsApiget()Gets the MultiversePortalsApi.@NotNull ActionHandlerProviderGets the instance of ActionHandlerProvider.@NotNull PortalFillerGets the instance of the PortalFiller.@NotNull PortalManagerGets the instance of the PortalManager.@NotNull PortalsConfigGets the instance of the PortalsConfig.@NotNull org.mvplugins.multiverse.core.inject.PluginServiceLocatorGets the instance of Multiverse-Portals's PluginServiceLocator.static booleanisLoaded()Checks whether the Multiverse-Portals API has been initialized.static voidwhenLoaded(@NotNull Consumer<MultiversePortalsApi> consumer) Executes a callback once the Multiverse-Portals API has been initialized.
-
Method Details
-
whenLoaded
@AvailableSince("5.3") public static void whenLoaded(@NotNull @NotNull Consumer<MultiversePortalsApi> consumer) Executes a callback once the Multiverse-Portals API has been initialized. The callback is executed immediately if the API is already initialized.- Parameters:
consumer- The callback to execute- Since:
- 5.3
-
isLoaded
@AvailableSince("5.3") public static boolean isLoaded()Checks whether the Multiverse-Portals API has been initialized.- Returns:
trueif the API has been initialized, otherwisefalse- Since:
- 5.3
-
get
Gets the MultiversePortalsApi. This will throw an exception if the Multiverse-Portals has not been initialized.- Returns:
- The MultiversePortalsApi
-
getPortalFiller
Gets the instance of the PortalFiller.- Returns:
- The PortalFiller instance
-
getPortalManager
Gets the instance of the PortalManager.- Returns:
- The PortalManager instance
-
getPortalsConfig
Gets the instance of the PortalsConfig.- Returns:
- The PortalsConfig instance
- Since:
- 5.1
-
getActionHandlerProvider
Gets the instance of ActionHandlerProvider.- Returns:
- The ActionHandlerProvider instance.
- Since:
- 5.3
-
getServiceLocator
@NotNull public @NotNull org.mvplugins.multiverse.core.inject.PluginServiceLocator getServiceLocator()Gets the instance of Multiverse-Portals's PluginServiceLocator.
You can use this to hook into the hk2 dependency injection system used by Multiverse-Portals.- Returns:
- The Multiverse-Portals's PluginServiceLocator
-