Package org.geysermc.api
Interface GeyserApiBase
- All Known Subinterfaces:
GeyserApi
- All Known Implementing Classes:
GeyserImpl
public interface GeyserApiBase
The base API class.
-
Method Summary
Modifier and TypeMethodDescription@Nullable Connection
connectionByName(@NonNull String name)
Gets the session from the given name, if applicable.@Nullable Connection
connectionByUuid(@NonNull UUID uuid)
Gets the session from the given UUID, if applicable.@Nullable Connection
connectionByXuid(@NonNull String xuid)
Gets the session from the given XUID, if applicable.default int
default int
@NonNull List<? extends Connection>
Gets all the online sessions.
-
Method Details
-
connectionByUuid
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.- Parameters:
uuid
- the UUID of the session- Returns:
- the session from the given UUID, if applicable
-
connectionByXuid
Gets the session from the given XUID, if applicable.- Parameters:
xuid
- the XUID of the session- Returns:
- the session from the given UUID, if applicable
-
connectionByName
Gets the session from the given name, if applicable.- Parameters:
name
- the uuid of the session- Returns:
- the session from the given name, if applicable
-
onlineConnections
@NonNull List<? extends Connection> onlineConnections()Gets all the online sessions.- Returns:
- all the online sessions
-
majorApiVersion
default int majorApiVersion()- Returns:
- the major API version. Bumped whenever a significant breaking change or feature addition is added.
-
minorApiVersion
default int minorApiVersion()- Returns:
- the minor API version. May be bumped for new API additions.
-