Refactor player handling: replace player arrays with IDs, implement PlayerSelector component
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user