Class Geyser


  • @NonNull
    public class Geyser
    extends java.lang.Object
    General 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 GeyserApiBase api()
      Returns the base api.
      static <T extends GeyserApiBase>
      T
      api​(@NonNull java.lang.Class<T> apiClass)
      Returns the api of the given type.
      static boolean isRegistered()
      Gets if the api has been registered and is ready for usage.
      static void set​(@NonNull GeyserApiBase api)
      Registers the given api type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Geyser

        public Geyser()
    • 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 if isRegistered() 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