hudly/hypixel/player.go
2024-10-22 18:49:14 -06:00

50 lines
1.3 KiB
Go

package hypixel
import "encoding/json"
type Player struct {
ID string `json:"id"`
UUID string `json:"uuid"`
PlayerName string `json:"playername"`
DisplayName string `json:"displayname"`
NetworkExp json.Number `json:"networkExp"`
KarmaExp json.Number `json:"karma"`
AchievementPoints json.Number `json:"achievementPoints"`
UserLanguage string `json:"userLanguage"`
RankPlusColor string `json:"rankPlusColor"`
Achievements Achievements `json:"achievements"`
Stats Stats `json:"stats"`
}
type Achievements struct {
BedwarsLevel int `json:"bedwars_level"`
}
type Stats struct {
Bedwars Bedwars `json:"Bedwars"`
}
type Bedwars struct {
Experience json.Number `json:"Experience"`
CurrentWinstreak int `json:"winstreak"` // If this isn't here, they have winstreak disabled (flag)
Wins int `json:"wins_bedwars"`
Losses int `json:"losses_bedwars"`
WLR float64
Kills int `json:"kills_bedwars"`
Deaths int `json:"deaths_bedwars"`
KDR float64
FinalKills int `json:"final_kills_bedwars"`
FinalDeaths int `json:"final_deaths_bedwars"`
FKDR float64
BedsBroken int `json:"beds_broken_bedwars"`
BedsLost int `json:"beds_lost_bedwars"`
BBLR float64
}
// TODO: set defaults (kdr, fkdr, bblr, wlr)