This commit is contained in:
Tnze
2022-01-04 23:24:28 +08:00
parent badf77d219
commit c724909cd7
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ One of the most useful functions of this lib is that it implements the network c
allows you to construct, send, receive, and parse network packets. All of them are encapsulated in `go-mc/net`
and `go-mc/net/packet`.
这个库最核心的便是实现了Minecraft底层的网络通信协议可以用构造、发送、接收和解读MC数据包。这是靠 `go-mc/net``go-mc/net/packet`这两个包实现的。
这个库最核心的便是实现了Minecraft底层的网络通信协议可以用构造、发送、接收和解读MC数据包。这是靠 `go-mc/net``go-mc/net/packet`这两个包实现的。
```go
import "github.com/Tnze/go-mc/net"

View File

@ -38,8 +38,8 @@ func main() {
log.Fatalf("Load chunks fail: %v", err)
}
commands := server.NewCommandGraph()
handleFunc := func(args []command.ParsedData) error {
commands := command.NewGraph()
handleFunc := func(ctx context.Context, args []command.ParsedData) error {
log.Printf("Command: args: %v", args)
return nil
}