Refactor player handling: replace player arrays with IDs, implement PlayerSelector component

This commit is contained in:
2025-12-02 22:23:55 +01:00
parent 7ec678ae7d
commit 5f5988e270
14 changed files with 332 additions and 304 deletions

View File

@@ -29,12 +29,20 @@ export type SchematicType = z.infer<typeof SchematicTypeSchema>;
export const PlayerSchema = z.object({
name: z.string(),
uuid: z.string(),
prefix: z.string(),
perms: z.array(z.string()),
prefix: z.string().nullable(),
perms: z.array(z.string()).nullable(),
id: z.number().nullable(),
});
export type Player = z.infer<typeof PlayerSchema>;
export const PlayerListSchema = z.object({
entries: z.array(PlayerSchema),
rows: z.number(),
});
export type PlayerList = z.infer<typeof PlayerListSchema>;
export const ServerSchema = z.object({
description: z.any(),
players: z.object({