mcserver

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChatMsgClass

func ChatMsgClass(m chat.Message) string

func GetPlayerNameFromWhisper added in v1.3.0

func GetPlayerNameFromWhisper(data string) (string, error)

Types

type PingStats

type PingStats struct {
	Delay         time.Duration
	PlayersOnline int64
	PlayersMax    int64
	Description   string
	Version       string
	Protocol      int64
}

type Server added in v1.2.2

type Server struct {
	Client   *bot.Client
	Hostname string
	Port     int
	Email    string

	Connected   bool
	ConnectTime time.Time
	// contains filtered or unexported fields
}

func New added in v1.2.2

func New() (Server, error)

func (*Server) Authenticate added in v1.2.2

func (s *Server) Authenticate(hostname string, port int, email, password string) error

func (*Server) Connect added in v1.2.2

func (s *Server) Connect() (err error)

func (*Server) HandleGame added in v1.2.2

func (s *Server) HandleGame() error

func (*Server) Handler added in v1.2.2

func (s *Server) Handler()

func (*Server) LogFields added in v1.2.2

func (s *Server) LogFields(f logrus.Fields) logrus.Fields

func (*Server) OnChatMsg added in v1.2.2

func (s *Server) OnChatMsg(c chat.Message, pos byte) error

func (*Server) OnDieMessage added in v1.2.2

func (s *Server) OnDieMessage() error

func (*Server) OnDisconnect added in v1.2.2

func (s *Server) OnDisconnect(c chat.Message) error

func (*Server) OnGameStart added in v1.2.2

func (s *Server) OnGameStart() error

func (*Server) OnPluginMessage added in v1.2.2

func (s *Server) OnPluginMessage(channel string, data []byte) error

func (*Server) Say added in v1.3.0

func (s *Server) Say(command string) error

func (*Server) Status added in v1.2.2

func (s *Server) Status() (ps PingStats, err error)

func (*Server) TestConnection added in v1.2.2

func (s *Server) TestConnection() error

func (*Server) Whisper added in v1.3.0

func (s *Server) Whisper(who, message string) error

Jump to

Keyboard shortcuts

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