Use packet queue for bot framework.

Providing concurrently-safing for sending packets.
This commit is contained in:
Tnze
2023-03-05 10:19:18 +08:00
parent 90501f1357
commit 925b1359fc
5 changed files with 85 additions and 14 deletions

View File

@ -51,7 +51,7 @@ func (p *Player) Respawn() error {
const PerformRespawn = 0
err := p.c.Conn.WritePacket(pk.Marshal(
int32(packetid.ServerboundClientCommand),
packetid.ServerboundClientCommand,
pk.VarInt(PerformRespawn),
))
if err != nil {