Class MultiversePortalsApi

java.lang.Object
org.mvplugins.multiverse.portals.MultiversePortalsApi

public final class MultiversePortalsApi extends Object
  • 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:
      true if the API has been initialized, otherwise false
      Since:
      5.3
    • get

      @NotNull public static @NotNull MultiversePortalsApi get()
      Gets the MultiversePortalsApi. This will throw an exception if the Multiverse-Portals has not been initialized.
      Returns:
      The MultiversePortalsApi
    • getPortalFiller

      @NotNull public @NotNull PortalFiller getPortalFiller()
      Gets the instance of the PortalFiller.
      Returns:
      The PortalFiller instance
    • getPortalManager

      @NotNull public @NotNull PortalManager getPortalManager()
      Gets the instance of the PortalManager.
      Returns:
      The PortalManager instance
    • getPortalsConfig

      @AvailableSince("5.1") @NotNull public @NotNull PortalsConfig getPortalsConfig()
      Gets the instance of the PortalsConfig.
      Returns:
      The PortalsConfig instance
      Since:
      5.1
    • getActionHandlerProvider

      @AvailableSince("5.3") @NotNull public @NotNull ActionHandlerProvider 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