Interface GeyserApi

All Superinterfaces:
GeyserApiBase
All Known Implementing Classes:
GeyserImpl

public interface GeyserApi extends GeyserApiBase
Represents the API used in Geyser.
  • Method Details

    • shutdown

      void shutdown()
      Shuts down the current Geyser instance.
    • reload

      void reload()
      Reloads the current Geyser instance.
    • productionEnvironment

      boolean productionEnvironment()
      Gets if this Geyser instance is running in an IDE. This only needs to be used in cases where files expected to be in a jarfile are not present.
      Returns:
      true if the version number is not 'DEV'.
    • connectionByUuid

      @Nullable GeyserConnection connectionByUuid(@NonNull UUID uuid)
      Gets the session from the given UUID, if applicable. The player must be logged in to the Java server for this to return a non-null value.
      Specified by:
      connectionByUuid in interface GeyserApiBase
      Parameters:
      uuid - the UUID of the session
      Returns:
      the session from the given UUID, if applicable
    • connectionByXuid

      @Nullable GeyserConnection connectionByXuid(@NonNull String xuid)
      Gets the session from the given XUID, if applicable.
      Specified by:
      connectionByXuid in interface GeyserApiBase
      Parameters:
      xuid - the XUID of the session
      Returns:
      the session from the given UUID, if applicable
    • connectionByName

      @Nullable GeyserConnection connectionByName(@NonNull String name)
      Gets the session from the given name, if applicable.
      Specified by:
      connectionByName in interface GeyserApiBase
      Parameters:
      name - the uuid of the session
      Returns:
      the session from the given name, if applicable
    • onlineConnections

      @NonNull List<? extends GeyserConnection> onlineConnections()
      Gets all the online sessions.
      Specified by:
      onlineConnections in interface GeyserApiBase
      Returns:
      all the online sessions