Class UUIDFetcher
java.lang.Object
net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDFetcher
- Author:
- evilmidget38 (previous author)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfetchUUIDsForClanPlayers(List<ClanPlayer> clanPlayers) Fetches UUIDs for a list of ClanPlayer objects.static @Nullable UUIDFetches the UUID for a single player name.
-
Method Details
-
fetchUUIDsForClanPlayers
public static Map<String,UUID> fetchUUIDsForClanPlayers(List<ClanPlayer> clanPlayers) throws InterruptedException, ExecutionException Fetches UUIDs for a list of ClanPlayer objects. This method extracts the names from the ClanPlayer objects and fetches their corresponding UUIDs.- Parameters:
clanPlayers- A list of ClanPlayer objects for which to fetch UUIDs- Returns:
- A Map where the keys are player names and the values are their corresponding UUIDs
- Throws:
InterruptedException- If the operation is interrupted while waitingExecutionException- If the computation threw an exception
-
getUUIDOf
@Nullable public static @Nullable UUID getUUIDOf(@NotNull @NotNull String name) throws InterruptedException, ExecutionException Fetches the UUID for a single player name. This method is a convenience wrapper around the batch UUID fetching process.- Parameters:
name- The name of the player whose UUID is to be fetched- Returns:
- The UUID of the specified player, or null if not found
- Throws:
InterruptedException- If the operation is interrupted while waitingExecutionException- If the computation threw an exception
-