states

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State int

State represents the state of the protocol in which a connection can be present. It is a Java edition client state.

const (
	// HandshakeState is the initial connection state. This status can be caused by a HandshakeIntent's STATUS,
	// LOGIN or TRANSFER intent. If the intent is LOGIN or TRANSFER, the next state will be LOGIN,
	// otherwise, it will go to the STATUS state.
	HandshakeState State = 0

	// StatusState is the ping state of a connection. Connections with the HandshakeIntent's STATUS intent will pass through this state
	// and be disconnected after it requests the ping from the server and the server responds with the respective ping.
	StatusState State = 1

	// LoginState is the authentication state of a connection. At this moment the player is authenticating with the authentication servers.
	LoginState State = 2

	// PlayState is the game state of a connection. In this state is where the whole game runs, the server is able to change
	// the player's state to CONFIGURATION as needed in versions 1.20.2 and higher.
	PlayState State = 3

	// ConfigState is the configuration state of a connection. At this point the player allows the server to send information
	// such as resource packs and plugin messages, at the same time the player will send his client brand and the respective plugin messages
	// if it is a modded client. This state is available since Minecraft 1.20.2.
	ConfigState State = 4
)

func (State) String

func (s State) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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