修正代码中的若干拼写错误
This commit is contained in:
@ -19,7 +19,7 @@ type Client struct {
|
||||
Wd world.World //the map data
|
||||
|
||||
// Delegate allows you push a function to let HandleGame run.
|
||||
// Do not send at the same goroutin!
|
||||
// Do not send at the same goroutine!
|
||||
Delegate chan func() error
|
||||
Events eventBroker
|
||||
|
||||
@ -29,7 +29,7 @@ type Client struct {
|
||||
// NewClient init and return a new Client.
|
||||
//
|
||||
// A new Client has default name "Steve" and zero UUID.
|
||||
// It is useable for an offline-mode game.
|
||||
// It is usable for an offline-mode game.
|
||||
//
|
||||
// For online-mode, you need login your Mojang account
|
||||
// and load your Name, UUID and AccessToken to client.
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Package bot implements a simple Minecraft client that can join a server
|
||||
// or just ping it for getting information.
|
||||
//
|
||||
// Runable example could be found at cmd/ .
|
||||
// Runnable example could be found at cmd/ .
|
||||
package bot
|
||||
|
||||
import (
|
||||
@ -15,10 +15,10 @@ import (
|
||||
// ProtocolVersion , the protocol version number of minecraft net protocol
|
||||
const ProtocolVersion = 490
|
||||
|
||||
// PingAndList chack server status and list online player.
|
||||
// PingAndList check server status and list online player.
|
||||
// Returns a JSON data with server status, and the delay.
|
||||
//
|
||||
// For more infomation for JSON format, see https://wiki.vg/Server_List_Ping#Response
|
||||
// For more information for JSON format, see https://wiki.vg/Server_List_Ping#Response
|
||||
func PingAndList(addr string, port int) ([]byte, time.Duration, error) {
|
||||
conn, err := net.DialMC(fmt.Sprintf("%s:%d", addr, port))
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user