View Source MCPing (mcping v0.3.0)

A utility library to ping other Minecraft: Java Edition servers.

Link to this section Summary

Functions

Pings a remote Minecraft: Java Edition server.

Link to this section Functions

Link to this function

get_info(address, port \\ 25565, options \\ [])

View Source

Pings a remote Minecraft: Java Edition server.

parameters

Parameters

  • address - The address of the server to ping.
  • port - The port of the server to ping. Defaults to 25565.
  • options - A keyword list of options:
    • :timeout - The timeout in milliseconds for the connection. Defaults to 3000.
    • :protocol_version - The protocol version to use for the handshake. Defaults to -1, whose behavior varies by server. Vanilla servers will typically respond with the version they use, Velocity will assume the latest version of Minecraft, and other servers may have different behavior.
    • :virtual_host - The virtual host to use for the handshake. Defaults to the specified address.

examples

Examples

 iex> MCPing.get_info("mc.hypixel.net")
 {:ok, ...}