Class ServerInfo
- java.lang.Object
-
- com.velocitypowered.api.proxy.server.ServerInfo
-
- All Implemented Interfaces:
Comparable<ServerInfo>
public final class ServerInfo extends Object implements Comparable<ServerInfo>
ServerInfo represents a server that a player can connect to. This object is immutable and safe for concurrent access.
-
-
Constructor Summary
Constructors Constructor Description ServerInfo(String name, SocketAddress address)Creates a new ServerInfo object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketAddressaddress()intcompareTo(ServerInfo o)booleanequals(@Nullable Object o)inthashCode()Stringname()StringtoString()
-
-
-
Constructor Detail
-
ServerInfo
public ServerInfo(String name, SocketAddress address)
Creates a new ServerInfo object.- Parameters:
name- the name for the serveraddress- the address of the server to connect to
-
-
Method Detail
-
name
public final String name()
-
address
public final SocketAddress address()
-
compareTo
public int compareTo(ServerInfo o)
- Specified by:
compareToin interfaceComparable<ServerInfo>
-
-