Server

object Server

Functions

Link copied to clipboard
fun getIP(): String

Gets the current server's IP, or "localhost" if the player is in a single-player world.

Link copied to clipboard
fun getMOTD(): String

Gets the current server's MOTD, or "SinglePlayer" if the player is in a single-player world.

Link copied to clipboard
fun getName(): String

Gets the current server's name, or "SinglePlayer" if the player is in a single-player world.

Link copied to clipboard
fun getPing(): Long

Gets the ping to the current server, or 5 if the player is in a single-player world.

Sources

Link copied to clipboard