// messages.go package main type IncomingMessage struct { Type string `json:"type"` // "auth", "chat", "location", "nick" Token string `json:"token,omitempty"` Nick string `json:"nick,omitempty"` ServerID string `json:"serverId,omitempty"` PlayerUUID string `json:"playerUuid,omitempty"` Message string `json:"message,omitempty"` X float64 `json:"x,omitempty"` Y float64 `json:"y,omitempty"` Z float64 `json:"z,omitempty"` Dimension string `json:"dimension,omitempty"` } type AuthOK struct { Type string `json:"type"` // "auth_ok" InternalName string `json:"internalName"` } type AuthError struct { Type string `json:"type"` // "auth_error" Error string `json:"error"` } type OutChat struct { Type string `json:"type"` // "chat" FromNick string `json:"fromNick"` FromInternal string `json:"fromInternal"` Message string `json:"message"` Timestamp int64 `json:"timestamp"` } type OutLocation struct { Type string `json:"type"` // "location" Nick string `json:"nick"` Internal string `json:"internal"` ServerID string `json:"serverId"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` Dimension string `json:"dimension"` Timestamp int64 `json:"timestamp"` }