Class MultiverseNetherPortalsApi
java.lang.Object
org.mvplugins.multiverse.netherportals.MultiverseNetherPortalsApi
Provides access to the Multiverse-NetherPortals API.
- Since:
- 5.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull MultiverseNetherPortalsApiget()Gets the Multiverse-NetherPortals API.@NotNull CustomPortalsHandlerGets the CustomPortalsHandler instance.@NotNull LinksManagerGets the LinksManager instance.@NotNull NetherPortalsConfigGets the NetherPortalsConfig instance.@NotNull org.mvplugins.multiverse.core.inject.PluginServiceLocatorGets the Multiverse-NetherPortals PluginServiceLocator.static booleanisLoaded()Checks whether the Multiverse-NetherPortals API has been initialized.static voidwhenLoaded(@NotNull Consumer<MultiverseNetherPortalsApi> consumer) Executes a callback once the Multiverse-NetherPortals API has been initialized.
-
Method Details
-
whenLoaded
@AvailableSince("5.1") public static void whenLoaded(@NotNull @NotNull Consumer<MultiverseNetherPortalsApi> consumer) Executes a callback once the Multiverse-NetherPortals API has been initialized. The callback is executed immediately if the API is already initialized.- Parameters:
consumer- The callback to execute- Since:
- 5.1
-
isLoaded
@AvailableSince("5.1") public static boolean isLoaded()Checks whether the Multiverse-NetherPortals API has been initialized.- Returns:
trueif the API has been initialized, otherwisefalse- Since:
- 5.1
-
get
Gets the Multiverse-NetherPortals API.- Returns:
- The Multiverse-NetherPortals API
- Throws:
IllegalStateException- if Multiverse-NetherPortals has not been initialized- Since:
- 5.1
-
getNetherPortalsConfig
Gets the NetherPortalsConfig instance.- Returns:
- The NetherPortalsConfig instance
- Since:
- 5.1
-
getLinksManager
Gets the LinksManager instance.- Returns:
- The LinksManager instance
- Since:
- 5.1
-
getCustomPortalsHandler
Gets the CustomPortalsHandler instance.- Returns:
- The CustomPortalsHandler instance
- Since:
- 5.1
-
getServiceLocator
@AvailableSince("5.1") @NotNull public @NotNull org.mvplugins.multiverse.core.inject.PluginServiceLocator getServiceLocator()Gets the Multiverse-NetherPortals PluginServiceLocator.
You can use this to hook into the dependency injection system used by Multiverse-NetherPortals.- Returns:
- The Multiverse-NetherPortals PluginServiceLocator
- Since:
- 5.1
-