Package org.geysermc.api
Class Geyser
- java.lang.Object
-
- org.geysermc.api.Geyser
-
@NonNull 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 @NonNull GeyserApiBaseapi()Returns the base api.static <T extends GeyserApiBase>
Tapi(@NonNull 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(@NonNull GeyserApiBase api)Registers the given api type.
-
-
-
Method Detail
-
api
public static @NonNull GeyserApiBase api()
Returns the base api.- Returns:
- the base api
-
api
public static <T extends GeyserApiBase> T api(@NonNull 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(@NonNull 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
-
-