Class QueryResponse
java.lang.Object
com.velocitypowered.api.proxy.server.QueryResponse
GS4 query response. This class is immutable.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder forQueryResponseobjects.static final classRepresents a plugin in the query response. -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryResponse.Builderbuilder()Creates a newQueryResponse.Builderinstance.booleanintGet current online player count which will be used to reply to the query.Get game version which will be used to reply to the query.Get hostname which will be used to reply to the query.getMap()Get map name which will be used to reply to the query.intGet max player count which will be used to reply to the query.Get collection of players which will be used to reply to the query.Get list of plugins which will be used to reply to the query.Get proxy (public facing) hostname.intGet proxy (public facing) port.Get server software (name and version) which will be used to reply to the query.inthashCode()Creates a newQueryResponse.Builderinstance from data represented by this response, so that you may create a newQueryResponsewith new data.toString()
-
Method Details
-
getHostname
Get hostname which will be used to reply to the query. By default it isProxyConfig.getMotd()in plain text without colour codes.- Returns:
- hostname
-
getGameVersion
Get game version which will be used to reply to the query. By default supported Minecraft versions range is sent.- Returns:
- game version
-
getMap
Get map name which will be used to reply to the query. By defaultProxyConfig.getQueryMap()is sent.- Returns:
- map name
-
getCurrentPlayers
public int getCurrentPlayers()Get current online player count which will be used to reply to the query.- Returns:
- online player count
-
getMaxPlayers
public int getMaxPlayers()Get max player count which will be used to reply to the query.- Returns:
- max player count
-
getProxyHost
Get proxy (public facing) hostname.- Returns:
- proxy hostname
-
getProxyPort
public int getProxyPort()Get proxy (public facing) port.- Returns:
- proxy port
-
getPlayers
Get collection of players which will be used to reply to the query.- Returns:
- collection of players
-
getProxyVersion
Get server software (name and version) which will be used to reply to the query.- Returns:
- server software
-
getPlugins
Get list of plugins which will be used to reply to the query.- Returns:
- collection of plugins
-
toBuilder
Creates a newQueryResponse.Builderinstance from data represented by this response, so that you may create a newQueryResponsewith new data. It is guaranteed thatqueryResponse.toBuilder().build().equals(queryResponse): that is, if no other changes are made to the returned builder, the built instance will equal the original instance.- Returns:
QueryResponsebuilder
-
builder
Creates a newQueryResponse.Builderinstance.- Returns:
QueryResponsebuilder
-
equals
-
hashCode
public int hashCode() -
toString
-