public final class QueryResponse extends Object
Modifier and Type | Class and Description |
---|---|
static class |
QueryResponse.Builder
A builder for
QueryResponse objects. |
static class |
QueryResponse.PluginInformation
Represents a plugin in the query response.
|
Modifier and Type | Method and Description |
---|---|
static QueryResponse.Builder |
builder()
Creates a new
QueryResponse.Builder instance. |
boolean |
equals(Object o) |
int |
getCurrentPlayers()
Get current online player count which will be used to reply to the query.
|
String |
getGameVersion()
Get game version which will be used to reply to the query.
|
String |
getHostname()
Get hostname which will be used to reply to the query.
|
String |
getMap()
Get map name which will be used to reply to the query.
|
int |
getMaxPlayers()
Get max player count which will be used to reply to the query.
|
Collection<String> |
getPlayers()
Get collection of players which will be used to reply to the query.
|
Collection<QueryResponse.PluginInformation> |
getPlugins()
Get list of plugins which will be used to reply to the query.
|
String |
getProxyHost()
Get proxy (public facing) hostname.
|
int |
getProxyPort()
Get proxy (public facing) port.
|
String |
getProxyVersion()
Get server software (name and version) which will be used to reply to the query.
|
int |
hashCode() |
QueryResponse.Builder |
toBuilder()
Creates a new
QueryResponse.Builder instance from data represented by this response, so that you
may create a new QueryResponse with new data. |
String |
toString() |
public String getHostname()
ProxyConfig.getMotdComponent()
in plain text without colour codes.public String getGameVersion()
public String getMap()
ProxyConfig.getQueryMap()
is sent.public int getCurrentPlayers()
public int getMaxPlayers()
public String getProxyHost()
public int getProxyPort()
public Collection<String> getPlayers()
public String getProxyVersion()
public Collection<QueryResponse.PluginInformation> getPlugins()
public QueryResponse.Builder toBuilder()
QueryResponse.Builder
instance from data represented by this response, so that you
may create a new QueryResponse
with new data. It is guaranteed that
queryResponse.toBuilder().build().equals(queryResponse)
: that is, if no other
changes are made to the returned builder, the built instance will equal the original instance.QueryResponse
builderpublic static QueryResponse.Builder builder()
QueryResponse.Builder
instance.QueryResponse
builder