Output spawn position and dimensions

This commit is contained in:
Melon 2020-11-23 18:20:11 +00:00
parent 89f50251a1
commit f5ad96e26e
1 changed files with 9 additions and 2 deletions

View File

@ -62,7 +62,9 @@ func main() {
}
if len(player.Pos) == 3 {
fmt.Printf("%s (%s): %v, %v, %v\n", apiResult.Data.Player.Username, uuid, player.Pos[0], player.Pos[1], player.Pos[2])
fmt.Printf("%s (%s): \n", apiResult.Data.Player.Username, uuid)
fmt.Printf(" - Pos (%s): %v, %v, %v\n", player.Dimension, player.Pos[0], player.Pos[1], player.Pos[2])
fmt.Printf(" - Spawn (%s): %v, %v, %v\n", player.SpawnDimension, player.SpawnX, player.SpawnY, player.SpawnZ)
}
continue
@ -76,7 +78,12 @@ func main() {
}
type playerCompound struct {
Pos []float64 `nbt:"Pos"`
Pos []float64 `nbt:"Pos"`
Dimension string `nbt:"Dimension"`
SpawnX int `nbt:"SpawnX"`
SpawnY int `nbt:"SpawnY"`
SpawnZ int `nbt:"SpawnZ"`
SpawnDimension string `nbt:"SpawnDimension"`
}
func fileExists(filename string) bool {