Class endstone::ServerListPingEvent¶
ClassList > endstone > ServerListPingEvent
Called when a server ping is coming in.
#include <endstone/event/server/server_list_ping_event.h>
Inherits the following classes: endstone::ServerEvent
Public Static Attributes¶
Type | Name |
---|---|
const std::string | NAME = = "ServerListPingEvent" |
Public Functions¶
Type | Name |
---|---|
ServerListPingEvent (std::string remote_host, int remote_port, std::string ping_response) |
|
bool | deserialize () |
virtual std::string | getEventName () override const |
GameMode | getGameMode () const |
std::string | getLevelName () const |
int | getLocalPort () const |
int | getLocalPortV6 () const |
int | getMaxPlayers () const |
std::string | getMinecraftVersionNetwork () const |
std::string | getMotd () const |
int | getNetworkProtocolVersion () const |
int | getNumPlayers () const |
std::string | getRemoteHost () const |
int | getRemotePort () const |
std::string | getServerGuid () const |
virtual bool | isCancellable () override const |
std::string | serialize () |
void | setGameMode (GameMode game_mode) |
void | setLevelName (std::string level_name) |
void | setMaxPlayers (int max_players) |
void | setMinecraftVersionNetwork (std::string minecraft_version_network) |
void | setMotd (std::string motd) |
void | setNumPlayers (int num_players) |
Public Functions inherited from endstone::ServerEvent¶
Type | Name |
---|---|
Event (bool async=false) |
|
Event (const Event &) = delete |
Public Functions inherited from endstone::Event¶
See endstone::Event
Type | Name |
---|---|
Event (bool async=false) |
|
Event (const Event &) = delete |
|
virtual std::string | getEventName () const = 0 |
bool | isAsynchronous () const |
virtual bool | isCancellable () const = 0 |
bool | isCancelled () const |
Event & | operator= (const Event &) = delete |
void | setCancelled (bool cancel) |
virtual | ~Event () = default |
Public Static Attributes Documentation¶
variable NAME¶
Public Functions Documentation¶
function ServerListPingEvent¶
inline endstone::ServerListPingEvent::ServerListPingEvent (
std::string remote_host,
int remote_port,
std::string ping_response
)
function deserialize¶
function getEventName¶
Gets a user-friendly identifier for this event.
Returns:
name of this event
Implements endstone::Event::getEventName
function getGameMode¶
Get the current game mode.
Returns:
the game mode
function getLevelName¶
Get the level name.
Returns:
the level name
function getLocalPort¶
Get the local port of the server.
Returns:
The local port
function getLocalPortV6¶
Get the local port of the server for IPv6 support
Returns:
The local port for IPv6
function getMaxPlayers¶
Get the maximum number of players allowed.
Returns:
the maximum number of players
function getMinecraftVersionNetwork¶
Get the network version of Minecraft that is supported by this server
Returns:
the network version of Minecraft
function getMotd¶
Get the message of the day message.
Returns:
the message of the day
function getNetworkProtocolVersion¶
Get the network protocol version of this server
Returns:
the network protocol version
function getNumPlayers¶
Get the number of players online
Returns:
the number of players
function getRemoteHost¶
Get the host the ping is coming from.
Returns:
The host
function getRemotePort¶
Get the port the ping is coming from.
Returns:
The port
function getServerGuid¶
Get the unique identifier of the server.
Returns:
The server guid
function isCancellable¶
Whether the event can be cancelled by a plugin or the server.
Returns:
true if this event can be cancelled
Implements endstone::Event::isCancellable
function serialize¶
function setGameMode¶
Set the current game mode.
Parameters:
game_mode
the game mode
function setLevelName¶
Set the level name.
Parameters:
level_name
the level name
function setMaxPlayers¶
Set the maximum number of players allowed.
Parameters:
max_players
the maximum number of players
function setMinecraftVersionNetwork¶
inline void endstone::ServerListPingEvent::setMinecraftVersionNetwork (
std::string minecraft_version_network
)
Set the network version of Minecraft that is supported by this server
Parameters:
minecraft_version_network
the network version of Minecraft
function setMotd¶
Change the message of the day message.
Parameters:
motd
the message of the day
function setNumPlayers¶
Set the number of players online.
Parameters:
num_players
the number of players
The documentation for this class was generated from the following file include/endstone/event/server/server_list_ping_event.h