Class VelocityCloudNetHelper
- java.lang.Object
-
- de.dytanic.cloudnet.ext.bridge.velocity.VelocityCloudNetHelper
-
public final class VelocityCloudNetHelper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot>SERVER_TO_SERVICE_INFO_SNAPSHOT_ASSOCIATION
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddServerToVelocityPrioritySystemConfiguration(de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot, java.lang.String name)static java.util.concurrent.CompletableFuture<de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot>connectToFallback(com.velocitypowered.api.proxy.Player player, java.lang.String currentServer)static NetworkConnectionInfocreateNetworkConnectionInfo(com.velocitypowered.api.proxy.Player player)static intgetLastOnlineCount()static java.util.Optional<com.velocitypowered.api.proxy.server.RegisteredServer>getNextFallback(com.velocitypowered.api.proxy.Player player)static com.velocitypowered.api.proxy.ProxyServergetProxyServer()static voidhandleWithListenerInfoServerPriority(java.util.function.Consumer<java.util.Collection<java.lang.String>> listenerInfoConsumer)static voidinit()static voidinitProperties(de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot)static booleanisFallbackServer(com.velocitypowered.api.proxy.server.ServerInfo serverInfo)static booleanisOnMatchingFallbackInstance(com.velocitypowered.api.proxy.Player player)static booleanisServiceEnvironmentTypeProvidedForVelocity(de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot)static voidremoveServerToVelocityPrioritySystemConfiguration(de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot, java.lang.String name)static voidsetProxyServer(com.velocitypowered.api.proxy.ProxyServer proxyServer)static voidupdateServiceInfo()
-
-
-
Method Detail
-
getLastOnlineCount
public static int getLastOnlineCount()
-
addServerToVelocityPrioritySystemConfiguration
public static void addServerToVelocityPrioritySystemConfiguration(de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot, java.lang.String name)
-
removeServerToVelocityPrioritySystemConfiguration
public static void removeServerToVelocityPrioritySystemConfiguration(de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot, java.lang.String name)
-
handleWithListenerInfoServerPriority
public static void handleWithListenerInfoServerPriority(java.util.function.Consumer<java.util.Collection<java.lang.String>> listenerInfoConsumer)
-
updateServiceInfo
public static void updateServiceInfo()
-
createNetworkConnectionInfo
public static NetworkConnectionInfo createNetworkConnectionInfo(com.velocitypowered.api.proxy.Player player)
-
getNextFallback
public static java.util.Optional<com.velocitypowered.api.proxy.server.RegisteredServer> getNextFallback(com.velocitypowered.api.proxy.Player player)
-
connectToFallback
public static java.util.concurrent.CompletableFuture<de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot> connectToFallback(com.velocitypowered.api.proxy.Player player, java.lang.String currentServer)
-
isServiceEnvironmentTypeProvidedForVelocity
public static boolean isServiceEnvironmentTypeProvidedForVelocity(de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot)
-
isOnMatchingFallbackInstance
public static boolean isOnMatchingFallbackInstance(com.velocitypowered.api.proxy.Player player)
-
isFallbackServer
public static boolean isFallbackServer(com.velocitypowered.api.proxy.server.ServerInfo serverInfo)
-
init
public static void init()
-
initProperties
public static void initProperties(de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot)
-
getProxyServer
public static com.velocitypowered.api.proxy.ProxyServer getProxyServer()
-
setProxyServer
public static void setProxyServer(com.velocitypowered.api.proxy.ProxyServer proxyServer)
-
-