Class Numdrassl
java.lang.Object
me.internalizable.numdrassl.api.Numdrassl
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 Summary
Modifier and TypeMethodDescriptionstatic ProxyServergetProxy()Get the proxy server instance.static booleanCheck if the API has been initialized.static voidsetProxy(ProxyServer proxyServer) Initialize the API with the proxy server instance.static voidsetServer(ProxyServer proxyServer) Initialize the API with the proxy server instance.
-
Method Details
-
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
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
Initialize the API with the proxy server instance. Alias forsetProxy(ProxyServer).- Parameters:
proxyServer- the proxy server instance
-