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 const
Gets a user-friendly identifier for this event.
Returns:
name of this event
getGameMode
GameMode getGameMode() const
Get the current game mode.
Returns:
the game mode
getLevelName
std::string getLevelName() const
Get the level name.
Returns:
the level name
getLocalPort
int getLocalPort() const
Get the local port of the server.
Returns:
The local port
getLocalPortV6
int getLocalPortV6() const
Get the local port of the server for IPv6 support
Returns:
The local port for IPv6
getMaxPlayers
int getMaxPlayers() const
Get the maximum number of players allowed.
Returns:
the maximum number of players
getMinecraftVersionNetwork
std::string getMinecraftVersionNetwork() const
Get the network version of Minecraft that is supported by this server
Returns:
the network version of Minecraft
getMotd
std::string getMotd() const
Get the message of the day message.
Returns:
the message of the day
getNetworkProtocolVersion
int getNetworkProtocolVersion() const
Get the network protocol version of this server
Returns:
the network protocol version
getNumPlayers
int getNumPlayers() const
Get the number of players online
Returns:
the number of players
getRemoteHost
std::string getRemoteHost() const
Get the host the ping is coming from.
Returns:
The host
getRemotePort
int getRemotePort() const
Get the port the ping is coming from.
Returns:
The port
getServerGuid
std::string getServerGuid() const
Get 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_mode
the game mode
setLevelName
void setLevelName(std::string level_name)
Set the level name.
Parameters:
level_name
the level name
setLocalPort
void setLocalPort(int port)
Set the local port of the server.
Parameters:
port
the local port
setLocalPortV6
void setLocalPortV6(int port)
Set the local port of the server for IPv6 support.
Parameters:
port
the local port for IPv6
setMaxPlayers
void setMaxPlayers(int max_players)
Set the maximum number of players allowed.
Parameters:
max_players
the 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_network
the network version of Minecraft
setMotd
void setMotd(std::string motd)
Change the message of the day message.
Parameters:
motd
the message of the day
setNumPlayers
void setNumPlayers(int num_players)
Set the number of players online.
Parameters:
num_players
the number of players
setServerGuid
void setServerGuid(std::string guid)
Set the unique identifier of the server.
Parameters:
guid
the server guid