console

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

type Console struct {
	// contains filtered or unexported fields
}

Console represents the server console and can be used to interact with the minecraft server.

func NewConsole

func NewConsole(stdin io.Writer, stderr io.Reader, stdout io.Reader) *Console

NewConsole creates a new console

func (*Console) SendCommand

func (c *Console) SendCommand(cmd string) error

SendCommand sends a command to the minecraft server

func (*Console) Start

func (c *Console) Start()

Start will start the console, it will follow the logs

func (*Console) Subscribe

func (c *Console) Subscribe(name string, handler func(line string))

Subscribe subscribes to the log stream

func (*Console) Unsubscribe

func (c *Console) Unsubscribe(name string)

Unsubscribe unsubscribes from the log stream

Jump to

Keyboard shortcuts

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