Interface ProxyConfig


  • public interface ProxyConfig
    Exposes certain proxy configuration information that plugins may use.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getAttemptConnectionOrder()
      Get the order of servers that players will be connected to.
      int getCompressionLevel()
      Get the level of compression that packets will be compressed to.
      int getCompressionThreshold()
      Get the minimum compression threshold for packets.
      int getConnectTimeout()
      Get how long this proxy will wait for a connection to be established before timing it out.
      java.util.Optional<Favicon> getFavicon()
      Get the proxy favicon shown in the tablist.
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getForcedHosts()
      Get forced servers mapped to a given virtual host.
      int getLoginRatelimit()
      Get the limit for how long a player must wait to log back in.
      net.kyori.adventure.text.Component getMotd()
      Get the MOTD component shown in the tab list.
      java.lang.String getQueryMap()
      Get the map name reported to GameSpy 4 query services.
      int getQueryPort()
      Get the port GameSpy 4 queries are accepted on.
      int getReadTimeout()
      Get how long this proxy will wait until performing a read timeout.
      java.util.Map<java.lang.String,​java.lang.String> getServers()
      Get a Map of all servers registered in velocity.toml.
      int getShowMaxPlayers()
      Get the maximum players shown in the tab list.
      boolean isAnnounceForge()
      Get whether this proxy displays that it supports Forge/FML.
      boolean isOnlineMode()
      Get whether the proxy is online mode.
      boolean isQueryEnabled()
      Whether GameSpy 4 queries are accepted by the proxy.
      boolean shouldPreventClientProxyConnections()
      If client's ISP/AS sent from this proxy is different from the one from Mojang's authentication server, the player is kicked.
      boolean shouldQueryShowPlugins()
      Whether GameSpy 4 queries should show plugins installed on Velocity by default.
    • Method Detail

      • isQueryEnabled

        boolean isQueryEnabled()
        Whether GameSpy 4 queries are accepted by the proxy.
        Returns:
        queries enabled
      • getQueryPort

        int getQueryPort()
        Get the port GameSpy 4 queries are accepted on.
        Returns:
        the query port
      • getQueryMap

        java.lang.String getQueryMap()
        Get the map name reported to GameSpy 4 query services.
        Returns:
        the map name
      • shouldQueryShowPlugins

        boolean shouldQueryShowPlugins()
        Whether GameSpy 4 queries should show plugins installed on Velocity by default.
        Returns:
        show plugins in query
      • getMotd

        net.kyori.adventure.text.Component getMotd()
        Get the MOTD component shown in the tab list.
        Returns:
        the motd component
      • getShowMaxPlayers

        int getShowMaxPlayers()
        Get the maximum players shown in the tab list.
        Returns:
        max players
      • isOnlineMode

        boolean isOnlineMode()
        Get whether the proxy is online mode. This determines if players are authenticated with Mojang. servers.
        Returns:
        online mode enabled
      • shouldPreventClientProxyConnections

        boolean shouldPreventClientProxyConnections()
        If client's ISP/AS sent from this proxy is different from the one from Mojang's authentication server, the player is kicked. This disallows some VPN and proxy connections but is a weak form of protection.
        Returns:
        whether to prevent client proxy connections by checking the IP with Mojang servers
      • getServers

        java.util.Map<java.lang.String,​java.lang.String> getServers()
        Get a Map of all servers registered in velocity.toml. This method does not return all the servers currently in memory, although in most cases it does. For a view of all registered servers, see ProxyServer.getAllServers().
        Returns:
        registered servers map
      • getAttemptConnectionOrder

        java.util.List<java.lang.String> getAttemptConnectionOrder()
        Get the order of servers that players will be connected to.
        Returns:
        connection order list
      • getForcedHosts

        java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getForcedHosts()
        Get forced servers mapped to a given virtual host.
        Returns:
        list of server names
      • getCompressionThreshold

        int getCompressionThreshold()
        Get the minimum compression threshold for packets.
        Returns:
        the compression threshold
      • getCompressionLevel

        int getCompressionLevel()
        Get the level of compression that packets will be compressed to.
        Returns:
        the compression level
      • getLoginRatelimit

        int getLoginRatelimit()
        Get the limit for how long a player must wait to log back in.
        Returns:
        the login rate limit (in milliseconds)
      • getFavicon

        java.util.Optional<Favicon> getFavicon()
        Get the proxy favicon shown in the tablist.
        Returns:
        optional favicon
      • isAnnounceForge

        boolean isAnnounceForge()
        Get whether this proxy displays that it supports Forge/FML.
        Returns:
        forge announce enabled
      • getConnectTimeout

        int getConnectTimeout()
        Get how long this proxy will wait for a connection to be established before timing it out.
        Returns:
        connection timeout (in milliseconds)
      • getReadTimeout

        int getReadTimeout()
        Get how long this proxy will wait until performing a read timeout.
        Returns:
        read timeout (in milliseconds)