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::Cancellable
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 | 
| std::string | serialize () | 
| void | setGameMode (GameMode game_mode) | 
| void | setLevelName (std::string level_name) | 
| void | setLocalPort (int port) | 
| void | setLocalPortV6 (int port) | 
| void | setMaxPlayers (int max_players) | 
| void | setMinecraftVersionNetwork (std::string minecraft_version_network) | 
| void | setMotd (std::string motd) | 
| void | setNumPlayers (int num_players) | 
| void | setServerGuid (std::string guid) | 
Public Functions inherited from endstone::Cancellable¶
| Type | Name | 
|---|---|
| virtual void | cancel () Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins. | 
| virtual bool | isCancelled () override const Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. | 
| virtual void | setCancelled (bool cancel) override Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. | 
Public Functions inherited from endstone::ICancellable¶
| Type | Name | 
|---|---|
| virtual void | cancel () = 0 | 
| virtual bool | isCancelled () const = 0 | 
| virtual void | setCancelled (bool cancel) = 0 | 
| virtual | ~ICancellable () = 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 serialize¶
function setGameMode¶
Set the current game mode.
Parameters:
- game_modethe game mode
function setLevelName¶
Set the level name.
Parameters:
- level_namethe level name
function setLocalPort¶
Set the local port of the server.
Parameters:
- portthe local port
function setLocalPortV6¶
Set the local port of the server for IPv6 support.
Parameters:
- portthe local port for IPv6
function setMaxPlayers¶
Set the maximum number of players allowed.
Parameters:
- max_playersthe 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_networkthe network version of Minecraft
function setMotd¶
Change the message of the day message.
Parameters:
- motdthe message of the day
function setNumPlayers¶
Set the number of players online.
Parameters:
- num_playersthe number of players
function setServerGuid¶
Set the unique identifier of the server.
Parameters:
- guidthe server guid
The documentation for this class was generated from the following file include/endstone/event/server/server_list_ping_event.h