Player Attributes

This commit is contained in:
xmdhs 2023-10-13 20:31:35 +08:00
parent ec58bebe78
commit ab34676921
No known key found for this signature in database
GPG Key ID: E809D6D43DEFCC95
2 changed files with 9 additions and 0 deletions

View File

@ -157,3 +157,9 @@ func (y *Yggdrasil) PlayerCertificates() http.HandlerFunc {
w.Write(lo.Must(json.Marshal(c)))
}
}
func (y *Yggdrasil) PlayerAttributes() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`{"privileges":{"onlineChat":{"enabled":true},"multiplayerServer":{"enabled":true},"multiplayerRealms":{"enabled":true},"telemetry":{"enabled":true},"optionalTelemetry":{"enabled":true}},"profanityFilterPreferences":{"profanityFilterOn":true},"banStatus":{"bannedScopes":{}}}`))
}
}

View File

@ -65,6 +65,9 @@ func newYggdrasil(handelY *yggdrasil.Yggdrasil) http.Handler {
r.Get("/sessionserver/session/minecraft/hasJoined", handelY.HasJoined())
r.Get("/minecraftservices/player/attributes", handelY.PlayerAttributes())
r.Post("/minecraftservices/player/attributes", handelY.PlayerAttributes())
r.Get("/", handelY.YggdrasilRoot())
return r
}