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

Server List packet. More...

#include <serverlist.h>

Inheritance diagram for ServerListPacket:
IPacket

Public Member Functions

 ServerListPacket ()
 Construct a new Server List Packet object.
 
 ~ServerListPacket () override=default
 Destroy the Server List Packet object.
 
void read (IMCStream *stream) override
 Read Packet Data.
 
- 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 this Packet as a lua class.
 

Public Attributes

int maxPlayers
 Max players.
 
int onlinePlayers
 Online players.
 
ChatMessage motd
 Message of The Day (MoTD)
 
- Public Attributes inherited from IPacket
int id
 Packet Id.
 

Protected Member Functions

void write (IMCStream *stream) override
 Write Packet Data.
 
- Protected Member Functions inherited from IPacket
 IPacket (int id)
 Construct a new IPacket object.
 

Detailed Description

Server List packet.

Packet for clients that load the status data from the server such as the MoTD, max players, online players and so on.

Member Function Documentation

◆ loadLua()

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

Loads this Packet as a lua class.

Parameters
statethe state to load to
baseNamespaceNamethe namespace to load to

◆ read()

void ServerListPacket::read ( IMCStream * stream)
overridevirtual

Read Packet Data.

Reads server list data from the stream, does nothing for the current protocol version.

Parameters
streamthe stream to read from
Deprecated
No need to call it, it does nothing

Implements IPacket.

◆ write()

void ServerListPacket::write ( IMCStream * stream)
overrideprotectedvirtual

Write Packet Data.

Writes server list data to stream

Parameters
streamthe stream to write to

Implements IPacket.

Member Data Documentation

◆ maxPlayers

int ServerListPacket::maxPlayers

Max players.

Max number of players allowed by the Config, defaults to config.

◆ motd

ChatMessage ServerListPacket::motd

Message of The Day (MoTD)

Defaults to config.

◆ onlinePlayers

int ServerListPacket::onlinePlayers

Online players.

The number of online players at this time. Defaults to actual number of players.


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