Package net.md_5.bungee.api.config

# Class ListenerInfo

java.lang.Object
net.md_5.bungee.api.config.ListenerInfo

public class ListenerInfo extends Object
Class representing the configuration of a server listener. Used for allowing multiple listeners on different ports.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ListenerInfo(InetSocketAddress host, String motd, int maxPlayers, int tabListSize, List<String> serverPriority, boolean forceDefault, Map<String,String> forcedHosts, String tabListType, boolean setLocalAddress, boolean pingPassthrough, int queryPort, boolean queryEnabled)`
  Deprecated.
  `ListenerInfo(SocketAddress socketAddress, String motd, int maxPlayers, int tabListSize, List<String> serverPriority, boolean forceDefault, Map<String,String> forcedHosts, String tabListType, boolean setLocalAddress, boolean pingPassthrough, int queryPort, boolean queryEnabled, boolean proxyProtocol)`
  Creates a new `ListenerInfo` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `canEqual(Object other)`
  `boolean`
  `equals(Object o)`
  `String`
  `getDefaultServer()`
  Deprecated.
  replaced by `serverPriority`
  `String`
  `getFallbackServer()`
  Deprecated.
  replaced by `serverPriority`
  `Map<String,String>`
  `getForcedHosts()`
  A list of host to server name mappings which will force a user to be transferred depending on the host they connect to.
  `InetSocketAddress`
  `getHost()`
  Deprecated.
  BungeeCord can listen via Unix domain sockets
  `int`
  `getMaxPlayers()`
  Max amount of slots displayed on the ping page.
  `String`
  `getMotd()`
  Displayed MOTD.
  `int`
  `getQueryPort()`
  What port to run udp query on.
  `List<String>`
  `getServerPriority()`
  List of servers in order of join attempt.
  `SocketAddress`
  `getSocketAddress()`
  Host to bind to.
  `int`
  `getTabListSize()`
  Number of players to be shown on the tab list.
  `String`
  `getTabListType()`
  The type of tab list to use
  `int`
  `hashCode()`
  `boolean`
  `isForceDefault()`
  Whether reconnect locations will be used, or else the user is simply transferred to the default server on connect.
  `boolean`
  `isPingPassthrough()`
  Whether to pass the ping through when we can reliably get the target server (force default server).
  `boolean`
  `isProxyProtocol()`
  Whether to support HAProxy PROXY protocol.
  `boolean`
  `isQueryEnabled()`
  Whether to enable udp query.
  `boolean`
  `isSetLocalAddress()`
  Whether to set the local address when connecting to servers.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ListenerInfo

    @Deprecated public ListenerInfo(InetSocketAddress host, String motd, int maxPlayers, int tabListSize, List<String> serverPriority, boolean forceDefault, Map<String,String> forcedHosts, String tabListType, boolean setLocalAddress, boolean pingPassthrough, int queryPort, boolean queryEnabled)
    Deprecated.

  - ### ListenerInfo

    public ListenerInfo(SocketAddress socketAddress, String motd, int maxPlayers, int tabListSize, List<String> serverPriority, boolean forceDefault, Map<String,String> forcedHosts, String tabListType, boolean setLocalAddress, boolean pingPassthrough, int queryPort, boolean queryEnabled, boolean proxyProtocol)
    Creates a new `ListenerInfo` instance.
    Parameters:
      `socketAddress` - Host to bind to.
      `motd` - Displayed MOTD.
      `maxPlayers` - Max amount of slots displayed on the ping page.
      `tabListSize` - Number of players to be shown on the tab list.
      `serverPriority` - List of servers in order of join attempt. First attempt is the first element, second attempt is the next element, etc etc.
      `forceDefault` - Whether reconnect locations will be used, or else the user is simply transferred to the default server on connect.
      `forcedHosts` - A list of host to server name mappings which will force a user to be transferred depending on the host they connect to.
      `tabListType` - The type of tab list to use
      `setLocalAddress` - Whether to set the local address when connecting to servers.
      `pingPassthrough` - Whether to pass the ping through when we can reliably get the target server (force default server).
      `queryPort` - What port to run udp query on.
      `queryEnabled` - Whether to enable udp query.
      `proxyProtocol` - Whether to support HAProxy PROXY protocol.

- ## Method Details

  - ### getDefaultServer

    @Deprecated public String getDefaultServer()
    Deprecated.
    replaced by `serverPriority`
    Gets the highest priority server to join.
    Returns:
      default server

  - ### getFallbackServer

    @Deprecated public String getFallbackServer()
    Deprecated.
    replaced by `serverPriority`
    Gets the second highest priority server to join, or else the highest priority.
    Returns:
      fallback server

  - ### getHost

    @Deprecated public InetSocketAddress getHost()
    Deprecated.
    BungeeCord can listen via Unix domain sockets
    Gets the bind address as an InetSocketAddress if possible.
    Returns:
      bind host

  - ### getSocketAddress

    public SocketAddress getSocketAddress()
    Host to bind to.

  - ### getMotd

    public String getMotd()
    Displayed MOTD.

  - ### getMaxPlayers

    public int getMaxPlayers()
    Max amount of slots displayed on the ping page.

  - ### getTabListSize

    public int getTabListSize()
    Number of players to be shown on the tab list.

  - ### getServerPriority

    public List<String> getServerPriority()
    List of servers in order of join attempt. First attempt is the first element, second attempt is the next element, etc etc.

  - ### isForceDefault

    public boolean isForceDefault()
    Whether reconnect locations will be used, or else the user is simply transferred to the default server on connect.

  - ### getForcedHosts

    public Map<String,String> getForcedHosts()
    A list of host to server name mappings which will force a user to be transferred depending on the host they connect to.

  - ### getTabListType

    public String getTabListType()
    The type of tab list to use

  - ### isSetLocalAddress

    public boolean isSetLocalAddress()
    Whether to set the local address when connecting to servers.

  - ### isPingPassthrough

    public boolean isPingPassthrough()
    Whether to pass the ping through when we can reliably get the target server (force default server).

  - ### getQueryPort

    public int getQueryPort()
    What port to run udp query on.

  - ### isQueryEnabled

    public boolean isQueryEnabled()
    Whether to enable udp query.

  - ### isProxyProtocol

    public boolean isProxyProtocol()
    Whether to support HAProxy PROXY protocol.

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### canEqual

    protected boolean canEqual(Object other)

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`