Class QueryResponse


  • public final class QueryResponse
    extends java.lang.Object
    GS4 query response. This class is immutable.
    • Method Detail

      • getHostname

        public java.lang.String getHostname()
        Get hostname which will be used to reply to the query. By default it is ProxyConfig.getMotd() in plain text without colour codes.
        Returns:
        hostname
      • getGameVersion

        public java.lang.String 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

        public java.lang.String getMap()
        Get map name which will be used to reply to the query. By default ProxyConfig.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

        public java.lang.String getProxyHost()
        Get proxy (public facing) hostname.
        Returns:
        proxy hostname
      • getProxyPort

        public int getProxyPort()
        Get proxy (public facing) port.
        Returns:
        proxy port
      • getPlayers

        public java.util.Collection<java.lang.String> getPlayers()
        Get collection of players which will be used to reply to the query.
        Returns:
        collection of players
      • getProxyVersion

        public java.lang.String getProxyVersion()
        Get server software (name and version) which will be used to reply to the query.
        Returns:
        server software
      • getPlugins

        public java.util.Collection<QueryResponse.PluginInformation> getPlugins()
        Get list of plugins which will be used to reply to the query.
        Returns:
        collection of plugins
      • toBuilder

        public 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. 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.
        Returns:
        QueryResponse builder
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object