diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c7902849..00000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: go - -go: -- master - -go_import_path: github.com/Tnze/go-mc diff --git a/README.md b/README.md index 05567044..756fbb14 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ ![Version](https://img.shields.io/badge/Minecraft-1.19.4-blue.svg) [![Go Reference](https://pkg.go.dev/badge/github.com/Tnze/go-mc.svg)](https://pkg.go.dev/github.com/Tnze/go-mc) [![Go Report Card](https://goreportcard.com/badge/github.com/Tnze/go-mc)](https://goreportcard.com/report/github.com/Tnze/go-mc) -[![Build Status](https://travis-ci.org/Tnze/go-mc.svg?branch=master)](https://travis-ci.org/Tnze/go-mc) [![Discord](https://img.shields.io/discord/915805561138860063?label=Discord)](https://discord.gg/A4qh8BT8Ue) ### [教程 · Tutorial](https://go-mc.github.io/tutorial/) diff --git a/net/packet/packet.go b/net/packet/packet.go index bc43f7df..c6cab396 100644 --- a/net/packet/packet.go +++ b/net/packet/packet.go @@ -101,13 +101,13 @@ func (p *Packet) packWithCompression(w io.Writer, threshold int) error { return err } -func compressPacket(w io.Writer, PacketID int32, Data []byte) error { +func compressPacket(w io.Writer, packetID int32, data []byte) error { zw := zlibPool.Get().(*zlib.Writer) defer zlibPool.Put(zw) zw.Reset(w) - _, _ = VarInt(PacketID).WriteTo(zw) - if _, err := zw.Write(Data); err != nil { + _, _ = VarInt(packetID).WriteTo(zw) + if _, err := zw.Write(data); err != nil { return err } return zw.Close()