Package org.geysermc.api
Class Geyser
java.lang.Object
org.geysermc.api.Geyser
General API class for Geyser.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GeyserApiBase
api()
Returns the base api.static <T extends GeyserApiBase>
TReturns the api of the given type.static boolean
Gets if the api has been registered and is ready for usage.static void
set(@NonNull GeyserApiBase api)
Registers the given api type.
-
Constructor Details
-
Geyser
public Geyser()
-
-
Method Details
-
api
Returns the base api.- Returns:
- the base api
-
api
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
Registers the given api type. The api cannot be registered ifregistered()
is true as an api has already been specified.- Parameters:
api
- the api
-
registered
public static boolean registered()Gets if the api has been registered and is ready for usage.- Returns:
- if the api has been registered
-