Contents
Class ProfileServiceClient
java.lang.Object
com.hypixel.hytale.server.core.auth.ProfileServiceClient
HTTP client for communicating with the Profile Service API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPublic game profile returned by the Profile Service. -
Constructor Summary
ConstructorsConstructorDescriptionProfileServiceClient(String profileServiceUrl) Creates a new Profile Service client. -
Method Summary
Modifier and TypeMethodDescriptiongetProfileByUsername(String username, String bearerToken) Gets a player's public profile by username.getProfileByUsernameAsync(String username, String bearerToken) Gets a player's public profile by username asynchronously.getProfileByUuid(UUID uuid, String bearerToken) Gets a player's public profile by UUID.getProfileByUuidAsync(UUID uuid, String bearerToken) Gets a player's public profile by UUID asynchronously.
-
Constructor Details
-
ProfileServiceClient
Creates a new Profile Service client.- Parameters:
profileServiceUrl- The base URL of the Profile Service
-
-
Method Details
-
getProfileByUuid
@Nullable public ProfileServiceClient.PublicGameProfile getProfileByUuid(@Nonnull UUID uuid, @Nonnull String bearerToken) Gets a player's public profile by UUID. GET /profile/uuid/{uuid}- Parameters:
uuid- The player's UUIDbearerToken- The bearer token for authentication (identity token with hytale:client or hytale:server scope)- Returns:
- The public game profile, or null if not found or request fails
-
getProfileByUuidAsync
public CompletableFuture<ProfileServiceClient.PublicGameProfile> getProfileByUuidAsync(@Nonnull UUID uuid, @Nonnull String bearerToken) Gets a player's public profile by UUID asynchronously. GET /profile/uuid/{uuid}- Parameters:
uuid- The player's UUIDbearerToken- The bearer token for authentication- Returns:
- CompletableFuture with the public game profile, or null if not found
-
getProfileByUsername
@Nullable public ProfileServiceClient.PublicGameProfile getProfileByUsername(@Nonnull String username, @Nonnull String bearerToken) Gets a player's public profile by username. GET /profile/username/{username}- Parameters:
username- The player's usernamebearerToken- The bearer token for authentication (identity token with hytale:client or hytale:server scope)- Returns:
- The public game profile, or null if not found or request fails
-
getProfileByUsernameAsync
public CompletableFuture<ProfileServiceClient.PublicGameProfile> getProfileByUsernameAsync(@Nonnull String username, @Nonnull String bearerToken) Gets a player's public profile by username asynchronously. GET /profile/username/{username}- Parameters:
username- The player's usernamebearerToken- The bearer token for authentication- Returns:
- CompletableFuture with the public game profile, or null if not found
-