Class Numdrassl

java.lang.Object
me.internalizable.numdrassl.api.Numdrassl

public final class Numdrassl extends Object
Static accessor for the Numdrassl API.

Use this class to obtain the ProxyServer instance from anywhere in your plugin code.

ProxyServer proxy = Numdrassl.getProxy();
proxy.getEventManager().register(this, new MyListener());
  • Method Details

    • getProxy

      @Nonnull public static ProxyServer getProxy()
      Get the proxy server instance.
      Returns:
      the proxy server
      Throws:
      IllegalStateException - if the API has not been initialized
    • isInitialized

      public static boolean isInitialized()
      Check if the API has been initialized.
      Returns:
      true if the API is available
    • setProxy

      public static void setProxy(@Nonnull ProxyServer proxyServer)
      Initialize the API with the proxy server instance. This is called internally by the proxy and should not be called by plugins.
      Parameters:
      proxyServer - the proxy server instance
    • setServer

      public static void setServer(@Nonnull ProxyServer proxyServer)
      Initialize the API with the proxy server instance. Alias for setProxy(ProxyServer).
      Parameters:
      proxyServer - the proxy server instance