This commit is contained in:
adman
2026-01-13 00:22:11 +01:00
parent 11bf0624a4
commit f97538fe19
6 changed files with 566 additions and 6 deletions
+2 -4
View File
@@ -78,8 +78,7 @@ func (a *Account) FetchKeys() (keys PlayerKeys, err error) {
}
func (a *Account) JoinServer(serverId string) (err error) {
var body []byte
body, err = json.Marshal(struct {
body, err := json.Marshal(struct {
AccessToken string `json:"accessToken"`
SelectedProfile string `json:"selectedProfile"`
ServerId string `json:"serverId"`
@@ -91,8 +90,7 @@ func (a *Account) JoinServer(serverId string) (err error) {
if err != nil {
return
}
var resp *http.Response
resp, err = http.Post("https://sessionserver.mojang.com/session/minecraft/join", "application/json", bytes.NewReader(body))
resp, err := http.Post("https://sessionserver.mojang.com/session/minecraft/join", "application/json", bytes.NewReader(body))
if err != nil {
return
}