console

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2020 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlock added in v1.4.0

func GetBlock(x, y, z int, path string) (string, error)

func GetString added in v1.4.0

func GetString(x, y, z int, path string) (string, error)

func GetText added in v1.4.0

func GetText(x, y, z int, path string) (string, error)

func Hostname added in v1.4.0

func Hostname() string

func Initialize

func Initialize(hostname string, port int, password string) (err error)

func Test

func Test()

Types

type Connection

type Connection struct {
	Hostname string
	Port     int
	// contains filtered or unexported fields
}

type ParseFunction

type ParseFunction func(string) error

type Player

type Player struct {
	Name      string
	X         int
	Y         int
	Z         int
	Dimension string
}

func GetPlayer

func GetPlayer(name string) (Player, error)

func (*Player) GetData

func (p *Player) GetData(path string, fn ParseFunction) error

func (*Player) ParseDimension

func (p *Player) ParseDimension(data string) error

func (*Player) ParsePos

func (p *Player) ParsePos(data string) error

type ServerInfo

type ServerInfo struct {
	Version    string
	Tps1       float64
	Tps5       float64
	Tps15      float64
	MaxPlayers int
	Players    []string
}

func GetServerInfo

func GetServerInfo() (ServerInfo, error)

func (*ServerInfo) GetPlayers

func (si *ServerInfo) GetPlayers() error

func (*ServerInfo) GetTPS

func (si *ServerInfo) GetTPS() error

func (*ServerInfo) GetVersion

func (si *ServerInfo) GetVersion() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL