Documentation
¶
Index ¶
- type ChatMessageEvent
- type Client
- func (c *Client) Chat(message string) error
- func (c *Client) Close() error
- func (c *Client) Connect(ctx context.Context) error
- func (c *Client) Destroy() error
- func (c *Client) Events() <-chan Event
- func (c *Client) GetStatus(ctx context.Context) (string, time.Duration, error)
- func (c *Client) Join(ctx context.Context) error
- func (c *Client) JoinAndListen(ctx context.Context, eventCount int) (<-chan Event, error)
- func (c *Client) Ping() (time.Duration, error)
- func (c *Client) SendClientSettings(settings protocol.ClientSettings) error
- func (c *Client) SendHandshake(state protocol.State) error
- func (c *Client) SendLogin(username string, uniqueId uuid.UUID) error
- func (c *Client) SendPingRequest() error
- func (c *Client) SendStatusRequest() error
- func (c *Client) ServerHostname() string
- func (c *Client) SetPosition(x, y, z float64, yaw, headYaw, pitch float32, onGround bool) error
- type ClientOption
- func WithAddr(addr string) ClientOption
- func WithBrand(brand string) ClientOption
- func WithConn(conn net.Conn, version protocol.Version) ClientOption
- func WithPrivateKey(key *rsa.PrivateKey) ClientOption
- func WithServerHostname(serverHostname string) ClientOption
- func WithTCPAddr(tcpAddr *net.TCPAddr) ClientOption
- func WithUUID(uuid uuid.UUID) ClientOption
- func WithUsername(username string) ClientOption
- func WithVersion(version protocol.Version) ClientOption
- type DisconnectEvent
- type Event
- type KeepAliveEvent
- type ReadyEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatMessageEvent ¶
type Client ¶
func NewClient ¶
func NewClient(opts ...ClientOption) (*Client, error)
func (*Client) JoinAndListen ¶
func (*Client) SendClientSettings ¶
func (c *Client) SendClientSettings(settings protocol.ClientSettings) error
func (*Client) SendPingRequest ¶
func (*Client) SendStatusRequest ¶
func (*Client) ServerHostname ¶
type ClientOption ¶
type ClientOption func(*Client)
func WithAddr ¶
func WithAddr(addr string) ClientOption
func WithBrand ¶
func WithBrand(brand string) ClientOption
func WithPrivateKey ¶
func WithPrivateKey(key *rsa.PrivateKey) ClientOption
func WithServerHostname ¶
func WithServerHostname(serverHostname string) ClientOption
func WithTCPAddr ¶
func WithTCPAddr(tcpAddr *net.TCPAddr) ClientOption
func WithUUID ¶
func WithUUID(uuid uuid.UUID) ClientOption
func WithUsername ¶
func WithUsername(username string) ClientOption
func WithVersion ¶
func WithVersion(version protocol.Version) ClientOption
type DisconnectEvent ¶
type KeepAliveEvent ¶
type ReadyEvent ¶
Click to show internal directories.
Click to hide internal directories.