Class Bridge

java.lang.Object
de.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
de.themoep.connectorplugin.ServerBridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
de.themoep.connectorplugin.limbo.Bridge
All Implemented Interfaces:
com.loohp.limbo.events.Listener

public class Bridge extends de.themoep.connectorplugin.ServerBridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player> implements com.loohp.limbo.events.Listener
  • Nested Class Summary

    Nested classes/interfaces inherited from class de.themoep.connectorplugin.ServerBridgeCommon

    de.themoep.connectorplugin.ServerBridgeCommon.LocationTeleportRequest, de.themoep.connectorplugin.ServerBridgeCommon.LoginRequest, de.themoep.connectorplugin.ServerBridgeCommon.PlayerTeleportRequest

    Nested classes/interfaces inherited from class de.themoep.connectorplugin.BridgeCommon

    de.themoep.connectorplugin.BridgeCommon.Action, de.themoep.connectorplugin.BridgeCommon.BridgeMessage, de.themoep.connectorplugin.BridgeCommon.PlayerInfo
  • Field Summary

    Fields inherited from class de.themoep.connectorplugin.BridgeCommon

    consumers, playerInfoMap, plugin, RANDOM, responses
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    de.themoep.connectorplugin.LocationInfo
    adapt(com.loohp.limbo.location.Location location)
     
    com.loohp.limbo.location.Location
    adapt(de.themoep.connectorplugin.LocationInfo location)
     
    CompletableFuture<de.themoep.connectorplugin.LocationInfo>
    getLocation(com.loohp.limbo.player.Player player)
    Get the location a player is connected to
    getServer(com.loohp.limbo.player.Player player)
    Get the server a player is connected to
    void
    onPlayerJoin(com.loohp.limbo.events.player.PlayerJoinEvent event)
     
    void
    onPlayerQuit(com.loohp.limbo.events.player.PlayerQuitEvent event)
     
    void
    onPlayerSpawnEvent(com.loohp.limbo.events.player.PlayerSpawnEvent event)
     
    runProxyPlayerCommand(com.loohp.limbo.player.Player player, String command)
    Run a command for a player on the proxy they are connected to.
    teleport(com.loohp.limbo.player.Player player, com.loohp.limbo.player.Player target, Consumer<String>... consumer)
     
    teleport(com.loohp.limbo.player.Player player, de.themoep.connectorplugin.LocationInfo location, Consumer<String>... consumer)
     
    teleport(com.loohp.limbo.player.Player player, String serverName, String worldName, Consumer<String>... consumer)
     
    teleport(String playerName, de.themoep.connectorplugin.LocationInfo location, Consumer<String>... consumer)
     
    teleport(String playerName, String serverName, String worldName, Consumer<String>... consumer)
     
    teleport(String playerName, String targetName, Consumer<String>... consumer)
     

    Methods inherited from class de.themoep.connectorplugin.ServerBridgeCommon

    runProxyConsoleCommand, sendResponseData, sendStarted, sendToServer

    Methods inherited from class de.themoep.connectorplugin.BridgeCommon

    addPlayerInfo, getLocation, getServer, handleResponse, isTeleporting, markTeleporting, registerHandler, registerMessageHandler, removePlayerInfo, runProxyConsoleCommand, runServerConsoleCommand, sendData, sendData, sendData, sendResponse, sendResponseMessage, unmarkTeleporting

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • onPlayerSpawnEvent

      @EventHandler public void onPlayerSpawnEvent(com.loohp.limbo.events.player.PlayerSpawnEvent event)
    • onPlayerJoin

      @EventHandler public void onPlayerJoin(com.loohp.limbo.events.player.PlayerJoinEvent event)
    • onPlayerQuit

      @EventHandler public void onPlayerQuit(com.loohp.limbo.events.player.PlayerQuitEvent event)
    • adapt

      public com.loohp.limbo.location.Location adapt(de.themoep.connectorplugin.LocationInfo location)
    • adapt

      public de.themoep.connectorplugin.LocationInfo adapt(com.loohp.limbo.location.Location location)
    • teleport

      @SafeVarargs public final CompletableFuture<Boolean> teleport(com.loohp.limbo.player.Player player, de.themoep.connectorplugin.LocationInfo location, Consumer<String>... consumer)
      Specified by:
      teleport in class de.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
    • teleport

      @SafeVarargs public final CompletableFuture<Boolean> teleport(String playerName, de.themoep.connectorplugin.LocationInfo location, Consumer<String>... consumer)
      Specified by:
      teleport in class de.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
    • teleport

      @SafeVarargs public final CompletableFuture<Boolean> teleport(com.loohp.limbo.player.Player player, String serverName, String worldName, Consumer<String>... consumer)
      Specified by:
      teleport in class de.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
    • teleport

      @SafeVarargs public final CompletableFuture<Boolean> teleport(String playerName, String serverName, String worldName, Consumer<String>... consumer)
      Specified by:
      teleport in class de.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
    • teleport

      @SafeVarargs public final CompletableFuture<Boolean> teleport(com.loohp.limbo.player.Player player, com.loohp.limbo.player.Player target, Consumer<String>... consumer)
      Specified by:
      teleport in class de.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
    • teleport

      @SafeVarargs public final CompletableFuture<Boolean> teleport(String playerName, String targetName, Consumer<String>... consumer)
      Specified by:
      teleport in class de.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
    • getServer

      public CompletableFuture<String> getServer(com.loohp.limbo.player.Player player)
      Get the server a player is connected to
      Specified by:
      getServer in class de.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
      Parameters:
      player - The player to get the server for
      Returns:
      A future for when the server was queried
    • getLocation

      public CompletableFuture<de.themoep.connectorplugin.LocationInfo> getLocation(com.loohp.limbo.player.Player player)
      Get the location a player is connected to
      Specified by:
      getLocation in class de.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
      Parameters:
      player - The player to get the location for
      Returns:
      A future for when the location was queried
    • runProxyPlayerCommand

      public CompletableFuture<Boolean> runProxyPlayerCommand(com.loohp.limbo.player.Player player, String command)
      Run a command for a player on the proxy they are connected to. The player needs to have access to that command!
      Parameters:
      player - The player to run the command for
      command - The command to run
      Returns:
      A future for whether the command was run successfully