Class VelocityProxy
java.lang.Object
de.rexlcloud.proxy.velocity.VelocityProxy
The rexlCloud plugin for Velocity proxies, installed by the cloud on every proxy. It registers the cloud's
servers with Velocity, sends joining players to a fallback server, shows the MOTD from the cloud and adds the
/cloud commands.
Other plugins use the cloud through RexlCloudApi.getInstance() (or getRexlCloudApi()); declare a
dependency on rexlcloud_proxy so it is initialized first.
-
Constructor Summary
ConstructorsConstructorDescriptionVelocityProxy(com.velocitypowered.api.proxy.ProxyServer server, org.slf4j.Logger logger) Internal: created by Velocity. -
Method Summary
Modifier and TypeMethodDescriptionorg.incendo.cloud.velocity.VelocityCommandManager<com.velocitypowered.api.command.CommandSource> The command manager of the/cloudcommands.static VelocityProxyThe plugin instance.org.slf4j.LoggerThe plugin's logger.de.rexlcloud.proxy.velocity.listener.LogingetLogin()Internal: the fallback servers players are sent to.The cloud API,nulluntil the first connection to the wrapper.com.velocitypowered.api.proxy.ProxyServerThe Velocity proxy.Name of this proxy in the cloud, e.g.de.rexlcloud.core.network.WrapperReconnectInternal: connects again when the connection to the wrapper breaks.Internal: the secret this run proves itself with to the wrapper.voidInternal: opens the connection to the wrapper.voidonProxyInitialization(com.velocitypowered.api.event.proxy.ProxyInitializeEvent event) Internal: starts the plugin.voidonProxyShutdown(com.velocitypowered.api.event.proxy.ProxyShutdownEvent event) Internal: tells the wrapper the proxy is stopping.voidsetRexlCloudApi(RexlCloudApi rexlCloudApi) The cloud API,nulluntil the first connection to the wrapper.voidDisconnects all players and shuts the proxy down.voidwritePacket(de.rexlcloud.core.network.PacketContainer packetContainer) Internal: sends a packet to the wrapper.
-
Constructor Details
-
VelocityProxy
@Inject public VelocityProxy(com.velocitypowered.api.proxy.ProxyServer server, org.slf4j.Logger logger) Internal: created by Velocity.
-
-
Method Details
-
onProxyInitialization
public void onProxyInitialization(com.velocitypowered.api.event.proxy.ProxyInitializeEvent event) Internal: starts the plugin. -
writePacket
public void writePacket(de.rexlcloud.core.network.PacketContainer packetContainer) Internal: sends a packet to the wrapper. -
onProxyShutdown
public void onProxyShutdown(com.velocitypowered.api.event.proxy.ProxyShutdownEvent event) Internal: tells the wrapper the proxy is stopping. -
initServerClient
public void initServerClient()Internal: opens the connection to the wrapper. -
shutdownServer
public void shutdownServer()Disconnects all players and shuts the proxy down. -
getInstance
The plugin instance. -
getWrapperReconnect
public de.rexlcloud.core.network.WrapperReconnect getWrapperReconnect()Internal: connects again when the connection to the wrapper breaks. -
getServer
public com.velocitypowered.api.proxy.ProxyServer getServer()The Velocity proxy. -
getLogger
public org.slf4j.Logger getLogger()The plugin's logger. -
getServerName
Name of this proxy in the cloud, e.g.Proxy-1. -
getWrapperToken
Internal: the secret this run proves itself with to the wrapper. -
getLogin
public de.rexlcloud.proxy.velocity.listener.Login getLogin()Internal: the fallback servers players are sent to. -
getRexlCloudApi
The cloud API,nulluntil the first connection to the wrapper. -
setRexlCloudApi
The cloud API,nulluntil the first connection to the wrapper. -
getCommandManager
public org.incendo.cloud.velocity.VelocityCommandManager<com.velocitypowered.api.command.CommandSource> getCommandManager()The command manager of the/cloudcommands.
-