server

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectConfig

type ConnectConfig struct {
	Message         string
	HideMessage     bool
	HandleStartgame bool
}

ConnectConfig is the configuration for sending a player.

type Info

type Info struct {
	Host string
	Port int
}

Info is the info about a Minecraft server.

type Player

type Player interface {
	Conn() *minecraft.Conn
	CurrentId() *atomic.Int64
	Entities() *entity.Store
	UniqueEntities() *entity.Store
	Blocks() *blocks.Store
	RemoteDisconnect(error)
	Server() Server
	Dimension() *atomic.Int32
	Send(info Info, config ...ConnectConfig) error
}

Player represents a player who is connected to the server.

type Remote

type Remote struct {
	Player          Player
	Conn            *minecraft.Conn
	Entities        *entity.Store
	UniqueEntities  *entity.Store
	Blocks          *blocks.Store
	HandleStartGame chan bool
	// contains filtered or unexported fields
}

Remote is a connection to a server.

func Connect

func Connect(info Info, player Player, connectConfig ...ConnectConfig) (remote *Remote, err error)

Connect opens a connection to a server to transfer the player.

func (*Remote) Info

func (remote *Remote) Info() Info

Info returns info about the server.

type Server

type Server interface {
	Info() Info
}

Server represents a Minecraft server.

Jump to

Keyboard shortcuts

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