vastlex

package
Version: v0.0.0-...-4859cea Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start() (err error)

Start starts the proxy.

Types

type Player

type Player interface {
	// Identity returns the IdentityData of the player.
	Identity() login.IdentityData

	// Send transfers the player to a server.
	Send(info server.Info, config ...server.ConnectConfig) error

	// Message sends a chat message to a player.
	Message(message string) error

	// Kick kicks a player from the proxy, if no reason is provided a default reason is used.
	Kick(reason ...string)

	// Server returns the current server that a player is in, if they aren't in a server it will be nil.
	Server() server.Server

	// WritePacket writes a packet directly to the player.
	WritePacket(packet packet.Packet) error
}

Player is a player connected to the proxy.

type Proxy

type Proxy interface {
	Motd() string
	SetMotd(string)
	Players() map[string]Player
	GetPlayer(string) (Player, error)
}

Proxy is as the name implies, a proxy.

var VastleX Proxy = vastlex

VastleX is the main structure for the proxy.

type Structure

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

Structure is the structure of VastleX.

func (*Structure) Config

func (vastlex *Structure) Config() config.Structure

...

func (*Structure) GetPlayer

func (vastlex *Structure) GetPlayer(username string) (Player, error)

...

func (*Structure) Motd

func (vastlex *Structure) Motd() string

...

func (*Structure) Players

func (vastlex *Structure) Players() map[string]Player

...

func (*Structure) SetMotd

func (vastlex *Structure) SetMotd(motd string)

...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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