Class BungeeProxy
java.lang.Object
net.md_5.bungee.api.plugin.Plugin
de.rexlcloud.proxy.bungee.BungeeProxy
public class BungeeProxy
extends net.md_5.bungee.api.plugin.Plugin
The rexlCloud plugin for BungeeCord proxies, installed by the cloud on every proxy. It registers the cloud's
servers with BungeeCord, sends joining players to a fallback server, shows the MOTD from the cloud and adds the
/cloud commands. BungeeCord only supports legacy forwarding (forwardingMode LEGACY on the master).
Other plugins use the cloud through RexlCloudApi.getInstance() (or getRexlCloudApi()); add
depends: [rexlCloudProxy] to their bungee.yml.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.incendo.cloud.bungee.BungeeCommandManager<net.md_5.bungee.api.CommandSender> The command manager of the/cloudcommands.static BungeeProxyde.rexlcloud.proxy.bungee.listener.LogingetLogin()Internal: the fallback servers players are sent to.The cloud API,nulluntil the first connection to the wrapper.net.md_5.bungee.api.ProxyServerThe BungeeCord 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.voidInternal: tells the wrapper the proxy is stopping.voidonEnable()Internal: starts the plugin.voidregisterShutdownHook(Callable<Void> callable) Runs the task (at most 30 seconds) before the cloud shuts the proxy down.voidsetRexlCloudApi(RexlCloudApi rexlCloudApi) The cloud API,nulluntil the first connection to the wrapper.voidRuns the shutdown hooks, disconnects all players and shuts the proxy down.voidunregisterShutdownHook(Callable<Void> callable) Removes a task added withregisterShutdownHook(Callable).voidwritePacket(de.rexlcloud.core.network.PacketContainer packetContainer) Internal: sends a packet to the wrapper.Methods inherited from class net.md_5.bungee.api.plugin.Plugin
getDataFolder, getDescription, getExecutorService, getFile, getLogger, getProxy, getResourceAsStream, onLoad
-
Constructor Details
-
BungeeProxy
public BungeeProxy()
-
-
Method Details
-
onEnable
public void onEnable()Internal: starts the plugin.- Overrides:
onEnablein classnet.md_5.bungee.api.plugin.Plugin
-
onDisable
public void onDisable()Internal: tells the wrapper the proxy is stopping.- Overrides:
onDisablein classnet.md_5.bungee.api.plugin.Plugin
-
writePacket
public void writePacket(de.rexlcloud.core.network.PacketContainer packetContainer) Internal: sends a packet to the wrapper. -
initServerClient
public void initServerClient()Internal: opens the connection to the wrapper. -
registerShutdownHook
-
unregisterShutdownHook
Removes a task added withregisterShutdownHook(Callable). -
shutdownServer
public void shutdownServer()Runs the shutdown hooks, disconnects all players and shuts the proxy down. -
getInstance
-
getShutdownHooks
-
getWrapperReconnect
public de.rexlcloud.core.network.WrapperReconnect getWrapperReconnect()Internal: connects again when the connection to the wrapper breaks. -
getServer
public net.md_5.bungee.api.ProxyServer getServer()The BungeeCord proxy. -
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.bungee.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.bungee.BungeeCommandManager<net.md_5.bungee.api.CommandSender> getCommandManager()The command manager of the/cloudcommands.
-