configuration protocol support draft

This commit is contained in:
Tnze
2023-11-19 02:10:15 +08:00
parent 61916db07a
commit 006f958f43
9 changed files with 184 additions and 106 deletions

View File

@ -94,7 +94,7 @@ func pingAndList(ctx context.Context, addr string, conn *mcnet.Conn) (data []byt
// LIST
// 请求服务器状态
err = conn.WritePacket(pk.Marshal(
packetid.StatusRequest,
packetid.ServerboundStatusRequest,
))
if err != nil {
return nil, 0, fmt.Errorf("bot: send list packect fail: %v", err)
@ -114,7 +114,7 @@ func pingAndList(ctx context.Context, addr string, conn *mcnet.Conn) (data []byt
// PING
startTime := time.Now()
err = conn.WritePacket(pk.Marshal(
packetid.StatusPingRequest,
packetid.ServerboundStatusPingRequest,
pk.Long(startTime.Unix()),
))
if err != nil {