Fix disconnect message decoding error

This commit is contained in:
Tnze
2024-04-27 23:00:55 +08:00
parent 01d05326e0
commit b893f721bd
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ func attachDisconnect(c *bot.Client, handler func(reason chat.Message) error) {
c.Events.AddListener(bot.PacketHandler{
Priority: 64, ID: packetid.ClientboundDisconnect,
F: func(p pk.Packet) error {
var reason chat.JsonMessage
var reason chat.Message
if err := p.Scan(&reason); err != nil {
return Error{err}
}