Class Bridge

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
de.rexlcloud.bridge.Bridge
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public class Bridge extends org.bukkit.plugin.java.JavaPlugin
The rexlCloud plugin for Paper and Spigot servers (1.8.8 and newer), installed by the cloud on every server.

Other plugins use the cloud through RexlCloudApi.getInstance() (or getRexlCloudApi()); add depend: [rexlCloudBridge] to their plugin.yml so the Bridge is enabled first. Positions are converted with RexlCloudHelper.

The Bridge connects to its wrapper on 127.0.0.1; if the wrapper goes away it tries to connect again for two minutes and then stops the server.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Bridge
    The plugin instance.
    The cloud API, null until the first connection to the wrapper.
    Name of this server in the cloud, e.g.
    de.rexlcloud.core.network.WrapperReconnect
    Internal: connects again when the connection to the wrapper breaks.
    Internal: the secret this run proves itself with to the wrapper.
    void
    Internal: opens the connection to the wrapper.
    void
     
    void
     
    void
    The cloud API, null until the first connection to the wrapper.
    void
    Sends the players on this server to a fallback server and shuts the server down.

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getClassLoader, getCommand, getConfig, getDatabase, getDatabaseClasses, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, initialize, installDDL, isEnabled, isInitialized, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, removeDDL, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Bridge

      public Bridge()
  • Method Details

    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • shutdownServer

      public void shutdownServer()
      Sends the players on this server to a fallback server and shuts the server down.
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • initServerClient

      public void initServerClient()
      Internal: opens the connection to the wrapper.
    • getInstance

      public static Bridge getInstance()
      The plugin instance.
    • getWrapperReconnect

      public de.rexlcloud.core.network.WrapperReconnect getWrapperReconnect()
      Internal: connects again when the connection to the wrapper breaks.
    • getRexlCloudApi

      public RexlCloudApi getRexlCloudApi()
      The cloud API, null until the first connection to the wrapper.
    • setRexlCloudApi

      public void setRexlCloudApi(RexlCloudApi rexlCloudApi)
      The cloud API, null until the first connection to the wrapper.
    • getServerName

      public String getServerName()
      Name of this server in the cloud, e.g. Lobby-1.
    • getWrapperToken

      public String getWrapperToken()
      Internal: the secret this run proves itself with to the wrapper.