update protocol packet definitions: replace value receivers with pointer receivers in PacketID methods, expand FixedBitSet size from 8 to 256 bits, and remove outdated documentation files

This commit is contained in:
2025-08-23 17:27:23 +08:00
parent eb01f5ccc7
commit 8b3d6c8bd5
122 changed files with 586 additions and 681 deletions

View File

@ -35,6 +35,14 @@ func New(c bot.Client) *Player {
pl.lastReceivedPacketTime = time.Now()
})
bot.AddHandler(c, func(ctx context.Context, p *client.KeepAlive) {
c.WritePacket(ctx, &server.KeepAlive{
ID: p.ID,
})
})
bot.AddHandler(c, func(ctx context.Context, p *client.Disconnect) {
fmt.Println(p.Reason.String())
})
bot.AddHandler(c, func(ctx context.Context, p *client.SystemChatMessage) {
if !p.Overlay {
bot.PublishEvent(c, MessageEvent{Message: p.Content})