Package ovh.mythmc.social.api.identity
Interface IdentityResolver
- All Known Implementing Classes:
AbstractIdentityResolver,BukkitIdentityResolver
public interface IdentityResolver
Resolves identity information between usernames and UUIDs.
An IdentityResolver provides lookup mechanisms for retrieving
Identified instances or resolving individual identity properties
such as usernames and UUIDs.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfromUsername(@NotNull String username) Attempts to retrieve anIdentifiedinstance from a username.Attempts to retrieve anIdentifiedinstance from a UUID.resolveUsername(@NotNull UUID uuid) Resolves a username from a UUID.resolveUuid(@NotNull String username) Resolves a UUID from a username.
-
Method Details
-
fromUsername
Attempts to retrieve anIdentifiedinstance from a username.- Parameters:
username- the username to resolve- Returns:
- an
Optionalcontaining the resolved identity, or empty if no match is found
-
fromUuid
Attempts to retrieve anIdentifiedinstance from a UUID.- Parameters:
uuid- the UUID to resolve- Returns:
- an
Optionalcontaining the resolved identity, or empty if no match is found
-
resolveUuid
Resolves a UUID from a username.- Parameters:
username- the username to resolve- Returns:
- an
Optionalcontaining the corresponding UUID, or empty if no match is found
-
resolveUsername
Resolves a username from a UUID.- Parameters:
uuid- the UUID to resolve- Returns:
- an
Optionalcontaining the corresponding username, or empty if no match is found
-