feat: add minecraftStats to player model and update related API endpoints

This commit is contained in:
Lars Behrends
2025-12-29 09:27:06 +01:00
parent abebf8f7a2
commit 5fe6724663
4 changed files with 80 additions and 19 deletions

View File

@@ -7,6 +7,30 @@ export interface Item {
nbtSummary?: string;
}
export interface MinecraftStats {
char: {
health: number;
maxHealth: number;
foodLevel: number;
xpLevel: number;
position: {
x: number;
y: number;
z: number;
};
};
statistics: {
general: { [key: string]: number };
kills: { [key: string]: number };
killed_by: { [key: string]: number };
};
advancements: Array<{
id: string;
title: string;
}>;
lastSync: number;
}
export interface PlayerStats {
playtimeHours: number;
level: number;
@@ -20,6 +44,7 @@ export interface Player {
skinUrl?: string; // Placeholder in a real app
inventory: (Item | null)[];
stats: PlayerStats;
minecraftStats?: MinecraftStats;
storyMarkdown: string;
tags: string[];
isOnline: boolean;