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, InetSocketAddress address)
Creates a new ServerInfo object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ServerInfo o)
boolean
equals(@Nullable Object o)
InetSocketAddress
getAddress()
String
getName()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
ServerInfo
public ServerInfo(String name, InetSocketAddress address)
Creates a new ServerInfo object.- Parameters:
name
- the name for the serveraddress
- the address of the server to connect to
-
-
Method Detail
-
getName
public final String getName()
-
getAddress
public final InetSocketAddress getAddress()
-
compareTo
public int compareTo(ServerInfo o)
- Specified by:
compareTo
in interfaceComparable<ServerInfo>
-
-