Class SmartFallback

java.lang.Object
net.ME1312.SubServers.Bungee.Library.Fallback.SmartFallback
All Implemented Interfaces:
ReconnectHandler

public class SmartFallback extends Object implements ReconnectHandler
Smart Fallback Handler Class
  • Field Details

    • dns_forward

      public static boolean dns_forward
  • Constructor Details

  • Method Details

    • getServer

      public ServerInfo getServer(ProxiedPlayer player)
      Specified by:
      getServer in interface ReconnectHandler
    • getServer

      protected ServerInfo getServer(ProxiedPlayer player, boolean queue)
    • getForcedHost

      public static ServerInfo getForcedHost(PendingConnection connection)
      Grabs the Forced Host Server for this connection
      Parameters:
      connection - Connection to check
      Returns:
      Forced Host Server (or null if there is none)
      See Also:
    • getDNS

      public static ServerInfo getDNS(PendingConnection connection)
      Grabs the Server that a connection's DNS matches
      Parameters:
      connection - Connection to check
      Returns:
      DNS Forward Server
    • getReconnectServer

      public static ServerInfo getReconnectServer(ProxiedPlayer player)
      Grabs the Server that a player was last connected to
      Parameters:
      player - Player
      Returns:
      Reconnect Server
    • getFallbackServers

      public static Map<String,ServerInfo> getFallbackServers(ListenerInfo listener)
      Generates a smart sorted map of fallback servers using a generated confidence score
      Parameters:
      listener - Listener to grab fallback servers from
      Returns:
      Fallback Server Map (with legacy bungee case-sensitive keys)
    • getFallbackServers

      public static Map<String,ServerInfo> getFallbackServers(ListenerInfo listener, ProxiedPlayer player)
      Generates a smart sorted map of fallback servers using a generated confidence score
      Parameters:
      listener - Listener to grab fallback servers from
      player - Player that is requesting fallback servers
      Returns:
      Fallback Server Map (with legacy bungee case-sensitive keys)
    • addInspector

      public static void addInspector(FallbackInspector inspector)
      Add a Fallback Server Inspector
      Parameters:
      inspector - Inspector
    • removeInspector

      public static void removeInspector(FallbackInspector inspector)
      Remove a Fallback Server Inspector
      Parameters:
      inspector - Inspector
    • setServer

      public void setServer(ProxiedPlayer player)
      Specified by:
      setServer in interface ReconnectHandler
    • save

      public void save()
      Specified by:
      save in interface ReconnectHandler
    • close

      public void close()
      Specified by:
      close in interface ReconnectHandler