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

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

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




This section is empty.


This section is empty.


This section is empty.


type Player

type Player struct {
	// contains filtered or unexported fields

Player represents a player connected to the proxy.

func New

func New(conn *minecraft.Conn) *Player

New initializes a player using the supplied *minecraft.Conn.

func (*Player) Blocks

func (p *Player) Blocks() *blocks.Store

Blocks returns the block store for the player.

func (*Player) Conn

func (p *Player) Conn() *minecraft.Conn

Conn returns the *minecraft.Conn for the player.

func (*Player) CurrentId

func (p *Player) CurrentId() *atomic.Int64

CurrentId returns the entity id counter for the player.

func (*Player) Dimension

func (p *Player) Dimension() *atomic.Int32

Dimension returns the player's current dimension.

func (*Player) Entities

func (p *Player) Entities() *entity.Store

Entities returns the entity store for the player.

func (*Player) Identity

func (p *Player) Identity() login.IdentityData

Identity returns the players login.IdentityData.

func (*Player) Kick

func (p *Player) Kick(msg ...string)

Kick kicks the player from the proxy.

func (*Player) Message

func (p *Player) Message(message string) error

Message sends a chat message to the player.

func (*Player) RemoteDisconnect

func (p *Player) RemoteDisconnect(err error)

RemoteDisconnect is called when a server disconnects the player.

func (*Player) Send

func (p *Player) Send(info server.Info, config ...server.ConnectConfig) error

Send transfers a player to a different server.

func (*Player) Server

func (p *Player) Server() server.Server

Server returns the current server that the player is connected to.

func (*Player) UniqueEntities

func (p *Player) UniqueEntities() *entity.Store

UniqueEntities returns the unique entity store for the player.

func (*Player) WritePacket

func (p *Player) WritePacket(packet packet.Packet) error

WritePacket writes a packet directly to the player.

Source Files

Jump to

Keyboard shortcuts

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