full cookie support

This commit is contained in:
Tnze
2024-06-16 16:58:47 +08:00
parent 5f5db75a34
commit 7d54712770
5 changed files with 65 additions and 17 deletions

View File

@ -41,6 +41,8 @@ func NewPlayer(c *bot.Client, settings Settings, events EventsListener) *Player
bot.PacketHandler{Priority: 0, ID: packetid.ClientboundKeepAlive, F: p.handleKeepAlivePacket},
bot.PacketHandler{Priority: 0, ID: packetid.ClientboundRespawn, F: p.handleRespawnPacket},
bot.PacketHandler{Priority: 0, ID: packetid.ClientboundPing, F: p.handlePingPacket},
bot.PacketHandler{Priority: 0, ID: packetid.ClientboundCookieRequest, F: p.handleCookieRequestPacket},
bot.PacketHandler{Priority: 0, ID: packetid.ClientboundStoreCookie, F: p.handleStoreCookiePacket},
)
events.attach(p)
return p