Package org.geysermc.api
Class Geyser
- java.lang.Object
-
- org.geysermc.api.Geyser
-
public class Geyser extends java.lang.ObjectGeneral API class for Geyser.
-
-
Constructor Summary
Constructors Constructor Description Geyser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GeyserApiBaseapi()Returns the base api.static <T extends GeyserApiBase>
Tapi(java.lang.Class<T> apiClass)Returns the api of the given type.static booleanisRegistered()Gets if the api has been registered and is ready for usage.static voidset(GeyserApiBase api)Registers the given api type.
-
-
-
Method Detail
-
api
public static GeyserApiBase api()
Returns the base api.- Returns:
- the base api
-
api
public static <T extends GeyserApiBase> T api(java.lang.Class<T> apiClass)
Returns the api of the given type.- Type Parameters:
T- the type- Parameters:
apiClass- the api class- Returns:
- the api of the given type
-
set
public static void set(GeyserApiBase api)
Registers the given api type. The api cannot be registered ifisRegistered()is true as an api has already been specified.- Parameters:
api- the api
-
isRegistered
public static boolean isRegistered()
Gets if the api has been registered and is ready for usage.- Returns:
- if the api has been registered
-
-