import { generateEmbed } from "@/common/embed"; import { NotFound } from "@/components/not-found"; import { Card } from "@/components/ui/card"; import { getPlayer } from "mcutils-library"; import { Player } from "mcutils-library/dist/types/player/player"; import { Metadata } from "next"; import Image from "next/image"; type Params = { params: { id: string; }; }; export async function generateMetadata({ params: { id } }: Params): Promise { const player = await getData(id); if (!player) { return generateEmbed({ title: "Unknown Player", description: "Player not found" }); } const { username, uniqueId, skin } = player; const headPartUrl = skin.parts.head; const description = ` Username: ${username} UUID: ${uniqueId}`; return generateEmbed({ title: `${username}`, description: description, image: headPartUrl, }); } async function getData(id: string): Promise { try { const cachedPlayer = await getPlayer(id); return cachedPlayer.player; } catch (error) { return null; // Player not found } } export default async function Page({ params }: Params) { const player = await getData(params.id); return (

Lookup a Player

You can enter a players uuid or username to get information about the player.

{player == null && } {player != null && (
The player's skin

{player.username}

{player.uniqueId}

Skin Parts

{Object.entries(player.skin.parts).map(([key, value]) => { return {`The; })}
)}
); }