Grpc Xenos Client
A GrpcXenosClient represents the gRPC implementation of the Xenos Client. The implementation is based on the official Protobuf definitions released with Xenos. Each platform only needs to use one implementation of the Xenos Client, but is free to choose it freely. This implementation is really fast and should be preferred if Xenos is deployed with gRPC.
When creating an instance of this implementation, the corresponding network channel is dynamically assembled for this purpose. The corresponding stubs for coroutine-based communication with the interface are instantiated for the channel to the attached sidecar. No action is taken by creating this instance, and communication with the external interface is not initiated.
Parameters
The host, under which the gRPC server of Xenos can be reached and that will therefore be used to establish the connection.
The port, under which the gRPC server of Xenos can be reached and that will therefore be used to establish the connection.
Functions
Closes all open resources that are associated with the Xenos Client. After this operation, this instance of the Xenos Client may no longer be used, as all connections are no longer usable. This method is idempotent and can therefore be called any number of times without changing its behaviour. It is guaranteed, that after this call all open connections and allocated resources will be closed or released. Although not all implementations have such resources, the method should still always be called (for example, within a Try-With-Resources block or a use method) to cleanly terminate resource usage.
Retrieves the current cape of the supplied userId from Xenos. The result includes the moment when the data was fetched from the Mojang API, to that stale data can be identified. If the player cannot be found or has no cape, null
will be returned. The texture is guaranteed to be present within the memory and therefore easily accessible.
Retrieves the current head of the supplied userId from Xenos. The result includes the moment when the data was fetched from the Mojang API, to that stale data can be identified. The overlay skin layer may be included. If the player cannot be found, null
will be returned. The texture is guaranteed to be present within the memory and therefore easily accessible.
Retrieves the current skin of the supplied userId from Xenos. The result includes the moment when the data was fetched from the Mojang API, to that stale data can be identified. If the player cannot be found, null
will be returned. The texture is guaranteed to be present within the memory and therefore easily accessible.
Retrieves the UUID for the supplied name from Xenos. The result includes the moment when the data was fetched from the Mojang API, so that stale data can be identified. If the player cannot be found, null
will be returned. The username does not have to be in the correct case and the canonical name will be returned within the result.
Retrieves the UUIDs of the supplied names from Xenos. Duplicates are filtered from the result and names that could not be found are discarded from the result. Each result includes the moment when the data was fetched from the Mojang API, so that stale data can be identified. The usernames do not have to be in the correct case and the canonical names will also be returned within the result.