Class SmartFallback
java.lang.Object
net.ME1312.SubServers.Bungee.Library.Fallback.SmartFallback
- All Implemented Interfaces:
ReconnectHandler
Smart Fallback Handler Class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addInspector
(FallbackInspector inspector) Add a Fallback Server Inspectorvoid
close()
static ServerInfo
getDNS
(PendingConnection connection) Grabs the Server that a connection's DNS matchesstatic Map<String,
ServerInfo> getFallbackServers
(ListenerInfo listener) Generates a smart sorted map of fallback servers using a generated confidence scorestatic Map<String,
ServerInfo> getFallbackServers
(ListenerInfo listener, ProxiedPlayer player) Generates a smart sorted map of fallback servers using a generated confidence scorestatic ServerInfo
getForcedHost
(PendingConnection connection) Grabs the Forced Host Server for this connectionstatic ServerInfo
getReconnectServer
(ProxiedPlayer player) Grabs the Server that a player was last connected togetServer
(ProxiedPlayer player) protected ServerInfo
getServer
(ProxiedPlayer player, boolean queue) static void
removeInspector
(FallbackInspector inspector) Remove a Fallback Server Inspectorvoid
save()
void
setServer
(ProxiedPlayer player)
-
Field Details
-
dns_forward
public static boolean dns_forward
-
-
Constructor Details
-
SmartFallback
-
-
Method Details
-
getServer
- Specified by:
getServer
in interfaceReconnectHandler
-
getServer
-
getForcedHost
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
Grabs the Server that a connection's DNS matches- Parameters:
connection
- Connection to check- Returns:
- DNS Forward Server
-
getReconnectServer
Grabs the Server that a player was last connected to- Parameters:
player
- Player- Returns:
- Reconnect Server
-
getFallbackServers
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 fromplayer
- Player that is requesting fallback servers- Returns:
- Fallback Server Map (with legacy bungee case-sensitive keys)
-
addInspector
Add a Fallback Server Inspector- Parameters:
inspector
- Inspector
-
removeInspector
Remove a Fallback Server Inspector- Parameters:
inspector
- Inspector
-
setServer
- Specified by:
setServer
in interfaceReconnectHandler
-
save
public void save()- Specified by:
save
in interfaceReconnectHandler
-
close
public void close()- Specified by:
close
in interfaceReconnectHandler
-