modules

package
v0.0.0-...-82b4563 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: LGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectAndLogin

func ConnectAndLogin(connectTo string, account *api.Account) (c *proto.Conn, err error)

func IgnoreConfig

func IgnoreConfig(c *proto.Conn) (err error)

func Login

func Login(c *proto.Conn, account *api.Account) (err error)

Types

type ConfigIgnorer

type ConfigIgnorer struct {
	*proto.Conn
}

func (*ConfigIgnorer) Default

func (c *ConfigIgnorer) Default(event event.Anything) (err error)

func (*ConfigIgnorer) OnFinish

func (*ConfigIgnorer) OnKeepAlive

func (c *ConfigIgnorer) OnKeepAlive(packet *v1_21_8.ConfigurationToClientPacketKeepAlive) (err error)

func (*ConfigIgnorer) OnKnownPacks

func (*ConfigIgnorer) OnPing

type IntervalTask

type IntervalTask struct {
	F           func() error
	LastTrigger time.Time
	Interval    time.Duration
}

type KickedDuringLoginErr

type KickedDuringLoginErr struct {
	text.Component
}

func (KickedDuringLoginErr) Error

func (k KickedDuringLoginErr) Error() string

type LoginClient

type LoginClient struct {
	*proto.Conn
	Account    *api.Account
	ServerHost string
	ServerPort uint16

	GivenAccount *v1_21_8.LoginToClientPacketSuccess
}

func (*LoginClient) Default

func (s *LoginClient) Default(event event.Unhandled) (err error)

func (*LoginClient) OnCompress

func (s *LoginClient) OnCompress(compress *v1_21_8.LoginToClientPacketCompress) (err error)

func (*LoginClient) OnCycle

func (s *LoginClient) OnCycle(_ event.Tick) (err error)

func (*LoginClient) OnDisconnect

func (s *LoginClient) OnDisconnect(packet *v1_21_8.LoginToClientPacketDisconnect) (err error)

func (*LoginClient) OnEncrypt

func (s *LoginClient) OnEncrypt(packet *v1_21_8.LoginToClientPacketEncryptionBegin) (err error)

func (*LoginClient) OnStart

func (s *LoginClient) OnStart(_ event.OnStart) (err error)

func (*LoginClient) OnSuccess

func (s *LoginClient) OnSuccess(success *v1_21_8.LoginToClientPacketSuccess) (err error)

type OnceTask

type OnceTask struct {
	F       func() error
	Trigger time.Time
}

type StatusClient

type StatusClient struct {
	*proto.Conn
	Status string
}

func (*StatusClient) Default

func (s *StatusClient) Default(event any) (err error)

func (*StatusClient) OnStart

func (s *StatusClient) OnStart(_ event.OnStart) (err error)

func (*StatusClient) OnStatus

type Timer

type Timer struct {
	Once     []OnceTask
	Interval []IntervalTask
	Active   bool
}

func (*Timer) Every

func (t *Timer) Every(interval time.Duration, f func() error)

func (*Timer) In

func (t *Timer) In(interval time.Duration, f func() error)

func (*Timer) Tick

func (t *Timer) Tick() (err error)

Jump to

Keyboard shortcuts

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