Versions in this module Expand all Collapse all v0 v0.0.0 Dec 30, 2023 Changes in this version + const ProtocolName + const ProtocolVersion + type GamePlay interface + AcceptPlayer func(name string, id uuid.UUID, profilePubKey *user.PublicKey, ...) + type GameProfile struct + ID uuid.UUID + Name string + type KeepAlive struct + func NewKeepAlive() (k *KeepAlive) + func (k *KeepAlive) AddPlayerDelayUpdateHandler(f func(c KeepAliveClient, delay time.Duration)) + func (k *KeepAlive) ClientJoin(client KeepAliveClient) + func (k *KeepAlive) ClientLeft(client KeepAliveClient) + func (k *KeepAlive) ClientTick(client KeepAliveClient) + func (k *KeepAlive) Run(ctx context.Context) + type KeepAliveClient interface + SendDisconnect func(reason chat.Message) + SendKeepAlive func(id int64) + type ListPingHandler interface + Description func() *chat.Message + FavIcon func() string + MaxPlayer func() int + Name func() string + OnlinePlayer func() int + PlayerSamples func() []PlayerSample + Protocol func(clientProtocol int32) int + type LoginChecker interface + CheckPlayer func(name string, id uuid.UUID, protocol int32) (ok bool, reason chat.Message) + type LoginFailErr struct + func (l LoginFailErr) Error() string + type LoginHandler interface + AcceptLogin func(conn *net.Conn, protocol int32) (name string, id uuid.UUID, profilePubKey *user.PublicKey, ...) + type MojangLoginHandler struct + EnforceSecureProfile bool + OnlineMode bool + Threshold int + func (d *MojangLoginHandler) AcceptLogin(conn *net.Conn, protocol int32) (name string, id uuid.UUID, profilePubKey *user.PublicKey, ...) + type Packet757 pk.Packet + type Packet758 pk.Packet + type PacketQueue = queue.Queue[pk.Packet] + type PingInfo struct + func NewPingInfo(name string, protocol int, motd chat.Message, icon image.Image) (p *PingInfo) + func (p *PingInfo) Description() *chat.Message + func (p *PingInfo) FavIcon() string + func (p *PingInfo) Name() string + func (p *PingInfo) Protocol(int32) int + type PlayerList struct + func NewPlayerList(maxPlayers int) *PlayerList + func (p *PlayerList) CheckPlayer(string, uuid.UUID, int32) (ok bool, reason chat.Message) + func (p *PlayerList) ClientJoin(client PlayerListClient, player PlayerSample) + func (p *PlayerList) ClientLeft(client PlayerListClient) + func (p *PlayerList) Len() int + func (p *PlayerList) MaxPlayer() int + func (p *PlayerList) OnlinePlayer() int + func (p *PlayerList) PlayerSamples() (sample []PlayerSample) + func (p *PlayerList) Range(f func(PlayerListClient, PlayerSample)) + type PlayerListClient interface + SendDisconnect func(reason chat.Message) + type PlayerSample struct + ID uuid.UUID + Name string + type Pos struct + X float64 + Y float64 + Z float64 + type Rot struct + Pitch float32 + Yaw float32 + type Server struct + func (s *Server) AcceptConn(conn *net.Conn) + func (s *Server) Listen(addr string) error + type WritePacketError struct + Err error + ID int32 + func (s WritePacketError) Error() string + func (s WritePacketError) Unwrap() error