Interface MotdProvider

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MotdProvider
Functional interface providing the MOTD returned to clients querying the server.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable PongData
    getMotd(String host, InetSocketAddress remoteAddress)
    Called for every status request, so the returned data can change over time.
  • Method Details

    • getMotd

      @Nullable PongData getMotd(String host, InetSocketAddress remoteAddress)
      Called for every status request, so the returned data can change over time.

      Called on the event loop, so don't block in here. Every field of PongData is written to the status document, in the order the schema lists.

      Answering null serves no status at all, which is how a host says it does not take NetherNet for this request. A join sent anyway still reaches the PlayerFilter.

      Parameters:
      host - The host header from the join request, which may be used to identify the server
      remoteAddress - The address the status request came from
      Returns:
      The MOTD to advertise, or null to leave the client to its other transport