endstone::ServerListPingEvent
Called when a server ping is coming in.
Bases: endstone::Cancellable< ServerEvent >
Attributes:
| Name | Description |
|---|---|
NAME |
Functions:
NAME
const std::string endstone::ServerListPingEvent::NAME; ServerListPingEvent
ServerListPingEvent(std::string remote_host, int remote_port,
std::string ping_response) deserialize
bool deserialize() getEventName
std::string getEventName() override constGets a user-friendly identifier for this event.
Returns:
name of this event
getGameMode
GameMode getGameMode() constGet the current game mode.
Returns:
the game mode
getLevelName
std::string getLevelName() constGet the level name.
Returns:
the level name
getLocalPort
int getLocalPort() constGet the local port of the server.
Returns:
The local port
getLocalPortV6
int getLocalPortV6() constGet the local port of the server for IPv6 support
Returns:
The local port for IPv6
getMaxPlayers
int getMaxPlayers() constGet the maximum number of players allowed.
Returns:
the maximum number of players
getMinecraftVersionNetwork
std::string getMinecraftVersionNetwork() constGet the network version of Minecraft that is supported by this server
Returns:
the network version of Minecraft
getMotd
std::string getMotd() constGet the message of the day message.
Returns:
the message of the day
getNetworkProtocolVersion
int getNetworkProtocolVersion() constGet the network protocol version of this server
Returns:
the network protocol version
getNumPlayers
int getNumPlayers() constGet the number of players online
Returns:
the number of players
getRemoteHost
std::string getRemoteHost() constGet the host the ping is coming from.
Returns:
The host
getRemotePort
int getRemotePort() constGet the port the ping is coming from.
Returns:
The port
getServerGuid
std::string getServerGuid() constGet the unique identifier of the server.
Returns:
The server guid
serialize
std::string serialize() setGameMode
void setGameMode(GameMode game_mode)Set the current game mode.
Parameters:
game_modethe game mode
setLevelName
void setLevelName(std::string level_name)Set the level name.
Parameters:
level_namethe level name
setLocalPort
void setLocalPort(int port)Set the local port of the server.
Parameters:
portthe local port
setLocalPortV6
void setLocalPortV6(int port)Set the local port of the server for IPv6 support.
Parameters:
portthe local port for IPv6
setMaxPlayers
void setMaxPlayers(int max_players)Set the maximum number of players allowed.
Parameters:
max_playersthe maximum number of players
setMinecraftVersionNetwork
void 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
setMotd
void setMotd(std::string motd)Change the message of the day message.
Parameters:
motdthe message of the day
setNumPlayers
void setNumPlayers(int num_players)Set the number of players online.
Parameters:
num_playersthe number of players
setServerGuid
void setServerGuid(std::string guid)Set the unique identifier of the server.
Parameters:
guidthe server guid