diff --git a/README.md b/README.md index 238bc62..9754f35 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,16 @@ [![GoDoc](https://godoc.org/github.com/Tnze/go-mc?status.svg)](https://godoc.org/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) -There's some library in Go support you to create your Minecraft client or server. +There's some library in Go support you to create your Minecraft client or server. +这是一些Golang库,用于帮助你编写自己的Minecraft客户端或服务器, - [x] Mojang authenticate - [x] Minecraft network protocal - [x] Parse chat message - [x] Simple MC robot lib - [ ] Parse NBT -Some examples are at `/cmd` folder. +Some examples are at `/cmd` folder. +有一些例子在cmd目录下 > `1.13.2` version is at [gomcbot](https://github.com/Tnze/gomcbot). diff --git a/authenticate/authenticate.go b/authenticate/authenticate.go index 47ab7bf..07c8ecb 100644 --- a/authenticate/authenticate.go +++ b/authenticate/authenticate.go @@ -1,5 +1,7 @@ package authenticate +//Simple yggdrasil-minecraft-login method. + import ( "bytes" "encoding/json" diff --git a/chat/chatMsg.go b/chat/chatMsg.go index 07c4a0f..7b68d08 100644 --- a/chat/chatMsg.go +++ b/chat/chatMsg.go @@ -31,9 +31,9 @@ type jsonChat struct { //UnmarshalJSON decode json to Message func (m *Message) UnmarshalJSON(jsonMsg []byte) (err error) { if jsonMsg[0] == '"' { - err = json.Unmarshal(jsonMsg, &m.Text) + err = json.Unmarshal(jsonMsg, &m.Text) //Unmarshal as jsonString } else { - err = json.Unmarshal(jsonMsg, (*jsonChat)(m)) + err = json.Unmarshal(jsonMsg, (*jsonChat)(m)) //Unmarshal as jsonChat } return }