export async function getPlayerUUID(username) { try { // Make a GET request to Mojang API to fetch player UUID const response = await fetch(`https://api.mojang.com/users/profiles/minecraft/${username}`); // Check if the response is successful if (!response.ok) { throw new Error('Failed to fetch player UUID'); } // Parse the JSON response const data = await response.json(); // Extract the UUID from the response data const uuid = data.id; return uuid; } catch (error) { console.error('Error fetching player UUID:', error.message); return null; } }