Update packetid name

This commit is contained in:
Tnze
2021-12-09 20:24:39 +08:00
parent 805ca37a67
commit 0cc5695aa3
15 changed files with 203 additions and 474 deletions

View File

@ -77,7 +77,7 @@ func pingAndList(addr string, conn *mcnet.Conn) ([]byte, time.Duration, error) {
//LIST
//请求服务器状态
err = conn.WritePacket(pk.Marshal(
packetid.PingStart,
packetid.StatusRequest,
))
if err != nil {
return nil, 0, fmt.Errorf("bot: send list packect fail: %v", err)
@ -97,7 +97,7 @@ func pingAndList(addr string, conn *mcnet.Conn) ([]byte, time.Duration, error) {
//PING
startTime := time.Now()
err = conn.WritePacket(pk.Marshal(
packetid.PingServerbound,
packetid.StatusPing,
pk.Long(startTime.Unix()),
))
if err != nil {