Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
clientstate.h File Reference

The file containing just the enum of client state. More...

Go to the source code of this file.

Enumerations

enum  ClientState { HANDSHAKE = 0 , STATUS = 1 , LOGIN = 2 , PLAY = 3 }
 Client State. More...
 

Functions

void loadClientStateLua (lua_State *state, const char *namespaceName)
 Loads ClientState to lua.
 

Detailed Description

The file containing just the enum of client state.

Author
Lygaen Cayeuyx
Version
1.0
Date
2023-06-12

I mean, this file is not really useful and one file for just that is too much. But I can't be bothered with self-referencing files and other stuffs because or else this enum will be defined in client.h, but is used in packets that are referenced in client.h. The compiler would not know what to do and fail.

Enumeration Type Documentation

◆ ClientState

Client State.

The enum for the interger representation of the current client state.

Enumerator
HANDSHAKE 

Handshake state.

The default state when a client connects and has not yet handshaked. The next state should be STATUS or LOGIN.

STATUS 

Status state.

The state when the client and server exchange packets for server status. The server should close connection afterwards.

LOGIN 

Login state.

The state when the client and server authenticate if needed. The next state should be PLAY.

PLAY 

Play state.

The state when the client is actively playing on the server.

Function Documentation

◆ loadClientStateLua()

void loadClientStateLua ( lua_State * state,
const char * namespaceName )
inline

Loads ClientState to lua.

Parameters
statelua state to load to
namespaceNamethe namespace to load to