Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
DisconnectPlay Class Reference

Disconnect Packet for Play state. More...

#include <disconnect.h>

Inheritance diagram for DisconnectPlay:
IPacket

Public Member Functions

 DisconnectPlay (const ChatMessage &reason)
 Construct a new Disconnect Play object.
 
void read (IMCStream *stream) override
 Reads the packet from the stream.
 
- Public Member Functions inherited from IPacket
virtual ~IPacket ()=default
 Destroy the IPacket object.
 
void send (IMCStream *stream)
 Sends a Packet in Minecraft format.
 

Static Public Member Functions

static void loadLua (lua_State *state, const char *baseNamespaceName)
 Loads packet as lua class.
 

Public Attributes

ChatMessage reason
 The reason for the disconnection.
 
- Public Attributes inherited from IPacket
int id
 Packet Id.
 

Additional Inherited Members

- Protected Member Functions inherited from IPacket
 IPacket (int id)
 Construct a new IPacket object.
 

Detailed Description

Disconnect Packet for Play state.

Packet that should be sent to disconnect a client when being in ClientState::PLAY state.

Constructor & Destructor Documentation

◆ DisconnectPlay()

DisconnectPlay::DisconnectPlay ( const ChatMessage & reason)
inline

Construct a new Disconnect Play object.

Parameters
reasonthe reason for the disconnection

Member Function Documentation

◆ loadLua()

void DisconnectPlay::loadLua ( lua_State * state,
const char * baseNamespaceName )
static

Loads packet as lua class.

Parameters
statelua state to load to
baseNamespaceNamethe base namespace name to load to

◆ read()

void DisconnectPlay::read ( IMCStream * stream)
overridevirtual

Reads the packet from the stream.

Parameters
streamthe stream to read from
Deprecated
should not be used, useless

Implements IPacket.


The documentation for this class was generated from the following files: